What Is JSON? A Practical Introduction
JSON (JavaScript Object Notation) is a lightweight, text-based format for representing structured data, built on nested objects and arrays.
The basics
JSON represents data using two structures: objects (unordered key-value pairs wrapped in `{}`) and arrays (ordered lists wrapped in `[]`). Values can be strings, numbers, booleans, null, or nested objects and arrays. That's the entire structural vocabulary — there's no separate syntax for dates, references, or comments, which keeps parsers simple and consistent across every programming language.
Why JSON won
Before JSON became dominant, XML was the common choice for structured data exchange. JSON's appeal was simplicity: it maps directly onto data structures already native to most programming languages (objects/dictionaries and arrays/lists), requires no separate schema to be useful, and is dramatically less verbose than the equivalent XML. JavaScript running in the browser could parse it natively, which mattered enormously as web APIs proliferated.
Where you'll encounter JSON
Virtually every modern REST API returns JSON. Configuration files for countless tools (package.json, tsconfig.json, and many others) use it. Browsers' local storage and many databases store JSON-shaped documents directly. Understanding its structure is close to a baseline requirement for web development.
Getting started
The easiest way to get comfortable with JSON is to look at real examples — paste a response from any public API into a JSON formatter and see the structure laid out clearly. From there, practice writing small JSON objects by hand until the syntax (double-quoted keys, no trailing commas) becomes automatic.