JSON is the most common text format for exchanging data. It looks unfamiliar at first, but it follows only a handful of rules. Once you know braces, brackets and the value types, you can read almost any JSON file.
The basic shape
JSON is a collection of name and value pairs. Each pair is a key and its value, and the key is always wrapped in double quotation marks. A colon sits between key and value, a comma separates pairs, and curly braces { } wrap the pairs into one object.
For example, {"name": "Hana", "age": 31} is an object with two pairs. Line breaks and indentation do not change the meaning, so formatting a file in a tidy layout is a good first step before reading it. Pasting a long one-line JSON into a formatter makes the structure obvious right away.
Object: key and value pairs inside curly braces
Key: always text in double quotation marks
Commas between pairs, but none after the last pair
The six kinds of values
A value can only be one of a small set of kinds: text (in double quotation marks), a number, true or false, null for empty, a list in square brackets, or another object. Nesting these builds complex structures.
A number has no quotation marks, while "31" in quotes is text. That difference matters during conversion, because whether you can total a column depends on whether the values are numbers or text.
Text "Seoul", numbers 31 or 3.5
Booleans true and false, empty value null
Lists [1, 2, 3] and objects {"a": 1}
Reading lists and nesting
Square brackets [ ] form an ordered list. A list of objects looks just like the rows of a table: [{"name": "A"}, {"name": "B"}] is a table with two rows.
When an object or list sits inside another, that is nesting. Read from the outermost bracket and peel one layer at a time, checking that every opening bracket has a matching closing bracket.
Outer [ ] means a list of rows, outer { } means one object
Describe nested paths with dots: order.customer.name
Unmatched brackets are behind many error messages
Common mistakes
JSON is strict, so tiny slips make a file unreadable. The same few mistakes appear again and again when people edit by hand.
When you see an error, do not reread the whole file. Start near the spot you edited last and check commas and quotation marks first.
Single quotes: keys and text must use double quotes
A trailing comma after the last item is not allowed
Raw double quotes or line breaks inside text must be escaped
Comments are not supported
Moving between tables and JSON
Rows and columns map neatly onto a list of objects. The CSV to JSON tool on this site uses the header row as keys and builds one object per row, while the JSON to CSV tool spreads a list of objects back into a table.
Deeply nested JSON does not fit on a single flat sheet. Nested values may end up as text in one cell or as combined column names, so always scan the result after converting.
Table to JSON: first row becomes the keys, each later row an object
JSON to table: the union of all keys becomes the columns
If there is a lot of nesting, simplify the structure before flattening