Quiz Entry - updated: 2026.07.05
What is JSON and why is it popular for web APIs?
JSON (JavaScript Object Notation) is a lightweight text format whose syntax mirrors JavaScript objects, so the browser can turn it into usable data almost for free.
JSON encodes data as key–value pairs inside { }, looking just like a JavaScript object literal:
{
"name": "Anna Muster",
"age": 25,
"active": true
}
Its popularity comes from a few reinforcing properties:
- Cheap in the browser — one call to
JSON.parse()turns the text into a live JavaScript object;JSON.stringify()goes back the other way. No parsing library needed. - Compact — no closing tags to repeat, so payloads are smaller than the equivalent XML, which matters over the network.
- Readable — a human can skim it and understand it.
- Language-independent — although it grew out of JavaScript, every major language can read and write it, so it works between any two systems.
That combination is why most modern web APIs default to JSON.
Go deeper:
JSON (Wikipedia) — the open standard, its history (Douglas Crockford), and the ECMA-404 / RFC 8259 specs.
JSON.parse() — MDN — how JavaScript turns a JSON string into a usable object.