


We use cookies to improve your experience
We use essential cookies to make our site work. With your consent, we may also use non-essential cookies to improve user experience.
Definition
JSON (JavaScript Object Notation) is a lightweight text-based data interchange format. It uses key-value pairs and arrays to represent structured data. JSON is the dominant format for web APIs, configuration files, and data exchange between servers and clients.
JSON was derived from JavaScript object literal syntax by Douglas Crockford in the early 2000s. Despite its JavaScript origins, JSON is language-independent and supported by virtually every programming language. Its simplicity — only six data types (string, number, boolean, null, array, object) — makes it easy to parse and generate.
JSON has largely replaced XML as the standard data interchange format for web APIs. REST APIs overwhelmingly use JSON for request and response bodies. The format is also widely used for configuration files (package.json, tsconfig.json), document databases (MongoDB, CouchDB), and data storage in key-value stores.
JSON has limitations: it does not support comments (making configuration files harder to document), has no date type (dates are represented as strings), cannot represent circular references, and lacks a schema definition standard built into the format (though JSON Schema exists as a separate specification). For configuration files where comments are needed, YAML or JSON5 are alternatives.