XML gave machine-to-machine data a grammar of tags, namespaces and schemas — expressive, and heavy enough that sending a simple record meant writing a document. JSON took the opposite path: as its homepage puts it, JSON is built on two structures, a collection of name/value pairs and an ordered list of values, written with the conventions already familiar to programmers of C, C++, C#, Java, JavaScript, Perl and Python — which is exactly why those pages call it an ideal data-interchange language.

The format's lineage and its escape from JavaScript both appear in its standardization. RFC 8259, 'The JavaScript Object Notation (JSON) Data Interchange Format', describes a lightweight, text-based, language-independent data interchange format derived from the literals of JavaScript as defined in ECMAScript — recognizable to every web browser, but owned by none of them. The IETF's JSON Working Group carried it through RFC 7159 to RFC 8259, making JSON an Internet Standard in December 2017.

The consequence was displacement. Where APIs once negotiated XML schemas, they now return objects and arrays that any programmer can read at a glance — a format that reached the standards process only after adoption, instead of needing the standards process to recruit adopters.

Two structures are enough for every API

Two structures — objects and arrays — compose into nearly every data shape programs pass between systems, so the format needed no extension mechanism.

Deriving the syntax from JavaScript literals made the format instantly legible to the fastest-growing developer population, while language-independence kept every other community inside.

No schema or tag vocabulary was required, so an API could change its payload without coordinating a document-type definition.

Standardization through the IETF after adoption sealed interoperability without imposing the weight that made its predecessor unattractive.

A format wins by subtraction: fewer constructs mean fewer disagreements, and a data format that any programmer can read without documentation removes the resistance that stalled richer predecessors.

RFC 8259 made JSON an official Internet Standard in December 2017, by which point it had already become the default exchange format for web APIs, configuration and log data — a rare case of a format being standardized by a working group ratifying the world's existing behavior.

FOLLOW THE EVIDENCE

The sources

  1. RFC 8259: The JavaScript Object Notation (JSON) Data Interchange Format datatracker.ietf.org
  2. Introducing JSON json.org