History and Design Philosophy
Learning Focus
Use this lesson to understand why JSON exists — the context, constraints, and design trade-offs that shaped every rule you will encounter.
What is JSON?
JSON (JavaScript Object Notation) is a lightweight, text-based, language-independent data-interchange format, first coined by Douglas Crockford and standardised as:
| Standard | Year | Notes |
|---|---|---|
| RFC 4627 | 2006 | First official Internet Standard |
| RFC 7159 | 2014 | Clarified edge cases |
| RFC 8259 | 2017 | Current definitive spec |
| ECMA-404 | 2013 | ISO/IEC standardisation |
Despite its name, JSON is language-independent and natively supported by virtually every modern programming language.
Historical Context
JSON Evolution Timeline
| Year | Milestone |
|---|---|
| 2001 | Douglas Crockford coins "JSON" |
| 2002 | json.org website launched |
| 2006 | RFC 4627 — first official Internet Standard |
| 2009 | Node.js drives explosive adoption |
| 2013 | JSON Schema Draft 4 published |
| 2014 | RFC 7159 supersedes RFC 4627 |
| 2017 | RFC 8259 — current definitive spec |
| 2020 | JSON Schema Draft 2020-12 |
Design Goals
JSON was designed around four explicit constraints:
| Goal | Meaning | Why It Matters |
|---|---|---|
| Simple | Only 6 value types, minimal syntax | Easy to implement parsers in any language |
| Universal | No language-specific constructs | Works identically in Python, JS, Go, Rust |
| Human-readable | Plain text, consistent structure | Debuggable without special tools |
| Machine-efficient | Unambiguous grammar | Fast to parse; predictable token stream |
Deliberately excluded:
- Comments → kept out to encourage machine-generated JSON
- Trailing commas → avoids parser ambiguity
- Functions /
undefined/ Date objects → language-specific; use string encoding instead
Why JSON Won
- Browsers understand it natively —
JSON.parseandJSON.stringifyare built into every JS engine - REST APIs defaulted to JSON — lighter than XML-based SOAP
- NoSQL databases (MongoDB, CouchDB) adopted JSON-based storage
- CLI tooling (
jq,fx,gron) made it scriptable at the shell level
Concept Map
Concept Flow
RFC 8259 Spec → 6 Data Types → Objects and Arrays → Nesting → Real-world Payloads → APIs / DBs / Config
Common Pitfalls
| Pitfall | Consequence | Prevention |
|---|---|---|
| Confusing JSON with a JS object | Single quotes / undefined break parsers | Always validate with json.loads() or jq |
| Using JSON for binary data | Base64 bloat, no streaming | Use BSON, MessagePack, or Protocol Buffers |
| Assuming comment support | Strict parsers reject // and /* */ | Use JSONC (config) or move comments to docs |
| Treating JSON as a database | No transactions, no indexing | Use PostgreSQL JSONB or a document DB |
Quick Reference
{
"string": "value",
"number": 42,
"float": 3.14,
"boolean": true,
"null": null,
"array": [1, 2, 3],
"object": { "nested": true }
}
What's Next
- Next: JSON vs XML vs YAML — Compare the major data formats side-by-side.
- Section Overview — Return to the Introduction module index.