Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Questions tagged [json]

JavaScript Object Notation is an open standard key-value pair data format. Use this tag for questions that involve parsing, outputting, or otherwise manipulating JSON objects.

Filter by
Sorted by
Tagged with
10
votes
7answers
1k views

Extract all keys from an object (json)

Description Given an object (json), write code to extract all the keys from it. This is a question that I really wanted to ask everybody for a long time ago but I did not have time to write it up. It ...
11
votes
21answers
698 views

Minecraft Language Files Updater

In 1.13, Minecraft language files were switched from being a simple multi-line key=value format to JSON. Challenge Write a program converting from the original format returning a JSON string. Input ...
1
vote
5answers
338 views

String Array to JSON String

Introduction I've seen throughout the code-golf challenges several simple tasks involving JSON, such as interpreting JSON strings with RegExs, and almost every other manipulation I could think of. ...
74
votes
70answers
8k views

Print some JSON

This challenge is straightforward, but hopefully, there are plenty of avenues you can approach it: You need to print/return a valid JSON object of at least 15 characters, not counting unessential ...
1
vote
1answer
145 views

JSON tips: filter objects from array of objects where object name is alpha [closed]

What could be the shortest code for filtering the following array in Javascript without any library? My code is: filtered_obj = _.where(obj, { name: "Alpha" }); ...
11
votes
1answer
258 views

Help Jason format his JSON

Jason has a big JSON but it's unreadable, so he needs to prettify it. Formatting Spec The JSON has 4 different types: Numbers; Just 0-9 Strings; Double quoted <...
7
votes
1answer
284 views

Convert Valve KV into JSON

Valve's KV file format is as follows (in pseudo-EBNF): ...
5
votes
2answers
792 views

HTML2JSON Converter

Edit I have posted a 250 lines reference implementation for review at CR, discussing the major class of the code. Download the complete Visual Studio 2013, .NET 4.5 source code (10 kB) from my server....
7
votes
5answers
417 views

Network Transparent Boolean Logic Evaluator

Write an expression evaluator for boolean expressions encoded as JSON. Read on for explanation and rules. Motivation: Consider a scenario where two agents (Alice and Bob) are communicating with each ...
2
votes
11answers
4k views

Convert JSON string to Key / Value Arrays

Convert JSON (key/value pairs) to two native arrays, one array of keys and another of values, in your language. ...