JSON Specification & History
JavaScript Object Notation: the lightweight data format that powers modern APIs, configuration, and data interchange across the web.
What JSON Looks Like
{
"name": "JSON Example",
"version": 1.0,
"active": true,
"tags": ["data", "format", "api"],
"metadata": null,
"author": {
"name": "Douglas Crockford",
"site": "json.org"
}
}History of JSON
JSON Conceived
Douglas Crockford and Chip Morningstar start using a data format based on JavaScript object literals for web applications.
Wikipedia: CrockfordJSON.org Launched
Crockford registers json.org and publishes the first specification. The name 'JSON' (JavaScript Object Notation) is established.
JSON.orgFirst JSON API
JSON begins appearing in AJAX applications as a lightweight alternative to XML. Yahoo! is among early adopters.
RFC 4627 Published
IETF publishes the first official JSON specification as RFC 4627, defining the 'application/json' media type.
RFC 4627JSON in ECMAScript 5
Native JSON.parse() and JSON.stringify() methods added to JavaScript. No more eval() for parsing JSON!
MDN: JSONECMA-404 Standard
JSON becomes an official ECMA standard (ECMA-404), solidifying its position as a universal data interchange format.
ECMA-404RFC 7159 Update
Updated JSON specification allowing any JSON value at the root (not just objects/arrays as in RFC 4627).
RFC 7159RFC 8259 (Current)
Current authoritative JSON specification. Clarifies UTF-8 as the encoding and tightens parsing requirements.
RFC 8259JSON Everywhere
JSON is the dominant format for REST APIs, configuration files, NoSQL databases, and data interchange worldwide.
JSON Data Types
JSON supports exactly six data types. Nothing more, nothing less:
"Hello"Unicode text in double quotes
"name": "John Doe"123, 3.14, -5e10Integer or floating point (no hex/octal)
"age": 25, "price": 19.99true, falseLowercase literals only
"active": truenullRepresents absence of value
"middleName": null{ }Unordered key-value pairs
{"user": {"id": 1}}[ ]Ordered list of values
"tags": ["js", "api"]Key Syntax Rules
{"name": "value"}{name: 'value'}Always use double quotes for keys
"hello"'hello'Single quotes are not valid JSON
["a", "b"]["a", "b",]Common mistake from JavaScript
{"data": 1}{"data": 1} // commentUse JSONC or JSON5 if you need comments
Why JSON Became the Standard
JSON succeeded where XML struggled because of its simplicity:
- Human readable: Easy to write and understand
- Lightweight: Less verbose than XML
- Native to JavaScript: No parsing library needed in browsers
- Language agnostic: Parsers exist for every programming language
- Fast to parse: Simpler structure means faster processing
Today, JSON is used by virtually every REST API, most configuration files (package.json, tsconfig.json), and NoSQL databases like MongoDB.