The Origins of JSON

JSON was formalized by Douglas Crockford in the early 2000s as a lightweight alternative to XML for data interchange. It grew directly from JavaScript's object literal syntax, which made it naturally readable by JavaScript parsers. Despite its JS roots, parsers now exist in every programming language, making it truly universal.

The Basic Structure

JSON is built from two structures: objects (key-value pairs in curly braces) and arrays (ordered lists in square brackets). Values can be strings, numbers, booleans, null, nested objects, or nested arrays. This simple, recursive structure can represent virtually any data.

Why JSON Won Over XML

XML requires opening and closing tags for every element, creating verbose files. JSON achieves the same expressive power in roughly a quarter of the characters. It maps directly to the data structures programmers already think in — objects and arrays.

JSON Today

JSON is the default data format of REST APIs, the standard for configuration files (package.json, tsconfig.json), the native format for NoSQL databases like MongoDB, and the basis for derived formats like YAML and TOML. Understanding JSON is a fundamental skill for anyone building modern software.

Key Takeaway

JSON's dominance comes from a perfect balance of human readability and machine parseability. Learning it thoroughly pays dividends across every area of software development.