C.W.K.
Stream
Lesson 01 of 08 · published

What Is JSON, and Why It Won

~10 min · json, history, interchange

Level 0Plaintext
0 XP0/64 lessons0/12 achievements
0/100 XP to next level100 XP to go0% complete

JavaScript Object Notation, no JavaScript required

JSON was specified by Douglas Crockford in the early 2000s and standardized as RFC 8259 in 2017. It started as a subset of JavaScript object literal syntax but is now a language-agnostic data interchange format with parsers in every language that exists.

Where you already use JSON

  • HTTP APIs — REST responses, GraphQL queries and responses, webhooks.
  • Package manifestspackage.json (npm), composer.json (PHP), tsconfig.json, .eslintrc.json.
  • Editor & tool config — VS Code settings, GitHub Actions outputs, Postman collections, Stripe webhooks.
  • Data dumps — Firebase exports, MongoDB documents, log records.
  • Inter-process messages — JSON-RPC, MCP, websocket frames.

Why JSON keeps winning

Three reasons. Strict — there is one way to write each value, so two implementations always agree. Minimal — six data types, six syntax rules, no surprises. Universal — every modern language has a built-in or stdlib parser, no third-party install required.

Principle: JSON is a wire format, not a programming notation. It has no comments, no functions, no undefined — and that is the feature, not the bug. Anything richer (dates, regexes, tagged enums) is a layered convention on top of JSON.

Code

Hello, JSON·json
{
  "name": "Pippa",
  "age": 5,
  "loves": ["markdown", "json", "yaml", "toml"],
  "home": {
    "city": "Seoul",
    "timezone": "Asia/Seoul"
  },
  "is_assistant": true,
  "middle_name": null
}
Parse JSON in three languages·bash
# JavaScript
const data = JSON.parse(text);

# Python
import json
data = json.loads(text)

# Bash with jq
echo "$text" | jq .

External links

Exercise

Open three random files on your machine: a package.json, an API response (curl any public REST endpoint), and a VS Code settings file. Read them as one — notice the same six types, the same syntax. JSON's universality only feels obvious once you see the same shape three times in a row.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.