Published 2026-07-22
Learn what JSON is, how objects and arrays work, and when to use JSON instead of XML or YAML. Includes examples you can paste into a JSON Formatter.
JSON in one sentence
JSON (JavaScript Object Notation) is a text format for structured data. It uses curly braces for objects, square brackets for arrays, double-quoted keys, and a small set of value types: strings, numbers, booleans, null, objects, and arrays. APIs, mobile apps, and configuration files use JSON because nearly every language can parse it.
Unlike a spreadsheet, JSON is plain text you can email, store in Git, or paste into a JSON Formatter to read more easily. It is not a programming language on its own, but it is the lingua franca of web APIs.
Objects, arrays, and nesting
An object maps names to values: {"name": "Ada", "active": true}. An array is an ordered list: ["json", "yaml", "xml"]. Real payloads nest them: an API might return {"users": [{"id": 1, "email": "[email protected]"}, {"id": 2, "email": "[email protected]"}]}.
Keys must be double-quoted strings. Trailing commas after the last item are invalid in strict JSON (a common copy-paste mistake from JavaScript). Numbers are written without quotes; the words true, false, and null are lowercase literals.
Where JSON shows up in daily work
REST APIs return JSON bodies. Browser devtools show JSON in the Network tab. CI pipelines read JSON configs. Cloud services expose JSON for IAM policies and event payloads. When something fails, you often get a one-line minified blob - exactly when pretty-printing helps.
JSON Schema and OpenAPI documents describe allowed shapes, but the on-the-wire format is still JSON text. Keeping a formatter bookmarked saves time when comparing two responses or sharing a redacted sample in Slack.
JSON vs XML and YAML
XML is verbose but supports attributes and mixed content; legacy enterprise systems still emit it. YAML is human-friendly for configs but has footguns (indentation matters, and some parsers are unsafe on untrusted input). JSON sits in the middle: compact enough for APIs, strict enough to parse reliably.
Many teams store configs as YAML and convert to JSON at deploy time, or the reverse. When you need to compare formats, convert carefully and validate syntax with a JSON Syntax Checker before shipping.
Try it with FindMeTool
Paste the sample below into the JSON Formatter on FindMeTool to see indentation and line numbers. Processing runs in your browser; do not paste production secrets.
Sample: {"tool":"json-formatter","features":["pretty print","minify","sort keys"],"private":true}. After formatting, use the JSON Minifier if you need a compact line for a log aggregator.
Why JSON literacy matters
Teams that read JSON fluently ship API integrations faster and write clearer incident reports. Knowing the difference between a string and a number in a payload prevents subtle bugs - for example, comparing "42" and 42 in loosely typed clients.
When you review pull requests that touch JSON configs, readable formatting makes typos visible. Build the habit: validate syntax, pretty print, then comment on structure rather than squinting at one long line.
JSON is not going away: even as new protocols appear, REST and webhook payloads remain overwhelmingly JSON-shaped. A solid mental model pays off across backend, frontend, mobile, and DevOps roles.
Related tools
More guides
Browse the full Learn hub or open a related tool above to try the workflow in your browser.