JSON
Also known as: JavaScript Object Notation
Lightweight, text-based data interchange format that represents structured data as nested objects and arrays, derived from JavaScript syntax.
JSON, short for JavaScript Object Notation, is a plain-text format for representing structured data. It has a small set of building blocks: objects, which are unordered collections of name and value pairs enclosed in curly braces; arrays, which are ordered lists in square brackets; and the values strings, numbers, true, false and null. These can be nested to any depth, so a single JSON document can describe a user with a name, a list of email addresses and an object holding preferences. The format is easy for people to read and simple for programs to parse.
JavaScript object literals inspired the syntax, but JSON is language-independent, and libraries exist for virtually every programming language. Douglas Crockford specified and popularized the format in the early 2000s, publishing it at json.org, and it was later standardized as ECMA-404 in 2013 and as Internet standard RFC 8259 in 2017. JSON largely displaced XML as the preferred format for web APIs and underpins REST APIs, configuration files, document-oriented NoSQL databases and logging systems. JSON Schema provides a way to describe and validate the expected structure of documents.
JSON's simplicity is both a strength and a limitation. It has no comments, no date type, no direct way to represent binary data and only a single number type, so very large integers can lose precision when parsed into floating-point values. Alternatives address these gaps: YAML adds comments and a more readable syntax for configuration, while binary formats such as MessagePack and Protocol Buffers trade readability for compactness and speed. Parsing untrusted JSON safely matters too, since older code that evaluated JSON as JavaScript created security risks.
Key points
- JSON represents data with objects, arrays, strings, numbers, booleans and null, nested to any depth.
- Douglas Crockford popularized the format, which is standardized as ECMA-404 and RFC 8259.
- JSON became the dominant format for web APIs and is widely used for configuration and logging.
- It lacks comments and a date type, and very large integers can lose precision when parsed.
Related entries
YAML
Human-readable data serialization language that uses indentation to express structure, widely used for configuration files and data exchange.
JavaScript
High-level programming language of the web, created at Netscape in 1995, that runs in every major browser and on servers through runtimes like Node.js.
REST API
Web interface that follows the REST architectural style, exposing resources at URLs that clients manipulate with stateless HTTP requests.
API
Defined set of rules and interfaces through which one piece of software can request services or data from another without knowing its internals.
NoSQL
Broad category of databases that store data in models other than relational tables, such as documents, key-value pairs, wide columns or graphs.
HTTP
Stateless request-response protocol that web browsers, servers and other clients use to request and transfer resources such as web pages and data.
Markdown
Lightweight markup language that uses plain-text conventions such as asterisks and pound signs to format text that converts easily to HTML.
Referenced by
Other entries that discuss or point to JSON.