Developer
What is JSON?
Reviewed by the Tabreon team · Last updated: September 2026
Quick answer
JSON (JavaScript Object Notation) is a lightweight text format for representing structured data — objects, arrays, strings, numbers, booleans, and null — that's both easy for humans to read and easy for programs to parse.
Why this matters
JSON is the de facto standard for exchanging data between web APIs, config files, and applications — understanding its structure makes debugging, editing config, and reading API responses far easier.
Definition
JSON represents data as nested key-value pairs (objects, written with `{}`) and ordered lists (arrays, written with `[]`), built from six value types: string, number, boolean, null, object, and array. It was derived from JavaScript object literal syntax but is language-independent — nearly every programming language has a JSON parser.
How it works
A JSON document is plain text. A parser reads that text and converts it into the equivalent native data structure in whatever programming language is being used — for example, a JSON object becomes a Python dict or a JavaScript object. The reverse process, turning a data structure back into JSON text, is called serialization.
Step by step
- 1Data exists in a program. A structure like a list of user records lives in memory as native objects.
- 2Serialize to JSON. The program converts that structure to a JSON text string, e.g. to send in an API response.
- 3Transmit or store. The JSON text is sent over the network, saved to a file, or stored in a database.
- 4Parse back. The receiving program parses the JSON text back into a native data structure it can work with.
Common mistakes
- Using single quotes instead of double quotes around strings and keys — JSON requires double quotes.
- Leaving a trailing comma after the last item in an object or array — this is valid in JavaScript but invalid JSON.
- Adding comments — JSON has no comment syntax, unlike JavaScript or JSON5.
Best practices
- Validate JSON before using it in production, especially if it's hand-written or comes from an untrusted source.
- Keep keys consistently named (e.g. always camelCase or always snake_case) across a document.
- Use a formatter to keep deeply nested JSON readable during development.
Frequently asked questions
Related tools
Related guides
Sources
- RFC 8259 — The JavaScript Object Notation (JSON) Data Interchange Format
- ECMA-404 — The JSON Data Interchange Syntax