JSON
Also known as: JavaScript Object Notation, JSON format
JSON (JavaScript Object Notation) is a lightweight, text-based format for representing data as labelled values, lists, and nested groups, using curly braces and quotation marks.
Almost every web service, app, and API uses JSON to send information back and forth, such as weather data, user profiles, or order details. It's easy for both people and computers to read. While JSON is simple and universal, it doesn't allow comments and is strict about punctuation, so a single missing comma breaks a file.
JSON, explained at three levels
At home
JSON is like a neatly labelled form. Each piece of information has a name, such as 'city,' and a value, such as 'Toronto,' so any app can read it.
At work
JSON is the common language business systems use to exchange data through APIs and integrations.
At home
A JSON example looks like {"name": "Sophie", "age": 34}. Many apps let you export your data as JSON files.
At work
JSON supports strings, numbers, true or false, null, arrays, and objects. JSON Schema defines rules for validating data structures in integrations.
At home
If a settings file won't load, a missing comma or extra quotation mark is often the culprit. In my opinion, online JSON validators save a lot of frustration.
At work
Validate incoming JSON against schemas, limit payload sizes, handle dates and large numbers carefully since JSON lacks native types for them, and version API formats to avoid breaking integrations.
Real-world examples
At home
Marcus downloaded his data from a social media site. It arrived as JSON files, which he opened in a text editor to see what had been collected.
At work
Aisha integrates systems for a Vancouver retailer. She used JSON Schema to validate order data from partners, catching bad records before they reached inventory.
How it compares
| feature | JSON | YAML | XML |
|---|---|---|---|
| Readability | Good | Very good | Moderate |
| Comments | Not allowed | Allowed | Allowed |
| Main use | APIs, data exchange | Configuration files | Documents, older systems |
| Strictness | Strict | Whitespace-sensitive | Verbose |
JSON dominates APIs. YAML suits configs. XML suits older systems.
For analysts
In integration projects, I'd document JSON field definitions in a data dictionary. Mismatched assumptions about field formats cause most integration bugs.
History & origin
Douglas Crockford popularized JSON in the early 2000s, describing a subset of JavaScript syntax as a simpler alternative to XML for exchanging data between web browsers and servers, and launched json.org in 2002. As web apps and APIs grew in the late 2000s, JSON overtook XML as the dominant format. It was formally standardized as ECMA-404 in 2013 and in the internet standard RFC 8259 in 2017. Databases such as MongoDB and PostgreSQL added strong JSON support, and AI models in the 2020s gained 'structured output' features that return reliable JSON. In my view, JSON won because it was simple enough that nobody needed to argue about it.