Intosoft Tools
๐Ÿ“‹๐Ÿ“œ

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

1999

JSON Conceived

Douglas Crockford and Chip Morningstar start using a data format based on JavaScript object literals for web applications.

Wikipedia: Crockford
2001

JSON.org Launched

Crockford registers json.org and publishes the first specification. The name 'JSON' (JavaScript Object Notation) is established.

JSON.org
2002

First JSON API

JSON begins appearing in AJAX applications as a lightweight alternative to XML. Yahoo! is among early adopters.

2006

RFC 4627 Published

IETF publishes the first official JSON specification as RFC 4627, defining the 'application/json' media type.

RFC 4627
2009

JSON in ECMAScript 5

Native JSON.parse() and JSON.stringify() methods added to JavaScript. No more eval() for parsing JSON!

MDN: JSON
2013

ECMA-404 Standard

JSON becomes an official ECMA standard (ECMA-404), solidifying its position as a universal data interchange format.

ECMA-404
2014

RFC 7159 Update

Updated JSON specification allowing any JSON value at the root (not just objects/arrays as in RFC 4627).

RFC 7159
2017

RFC 8259 (Current)

Current authoritative JSON specification. Clarifies UTF-8 as the encoding and tightens parsing requirements.

RFC 8259
2020s

JSON 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:

String"Hello"

Unicode text in double quotes

"name": "John Doe"
Number123, 3.14, -5e10

Integer or floating point (no hex/octal)

"age": 25, "price": 19.99
Booleantrue, false

Lowercase literals only

"active": true
Nullnull

Represents absence of value

"middleName": null
Object{ }

Unordered key-value pairs

{"user": {"id": 1}}
Array[ ]

Ordered list of values

"tags": ["js", "api"]

Key Syntax Rules

Keys must be strings
โœ“ Correct
{"name": "value"}
โœ— Incorrect
{name: 'value'}

Always use double quotes for keys

Strings use double quotes only
โœ“ Correct
"hello"
โœ— Incorrect
'hello'

Single quotes are not valid JSON

No trailing commas
โœ“ Correct
["a", "b"]
โœ— Incorrect
["a", "b",]

Common mistake from JavaScript

No comments allowed
โœ“ Correct
{"data": 1}
โœ— Incorrect
{"data": 1} // comment

Use 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.