Lesson 1
What Is JSON?
Definition, history, and where JSON appears in modern software.
JSON stands for JavaScript Object Notation. Despite the name, JSON is a text-based data format, not a programming language. Any environment with a JSON parser can read and write it—Python, Java, Go, Rust, and countless others.
A minimal example
{
"name": "Ada",
"active": true,
"score": 98.5
}
This document describes one object with three properties: a string, a boolean, and a number.
Why JSON became popular
Before JSON dominated web APIs, XML was common. JSON is usually shorter and easier for humans to scan, while still being machine-readable. It maps naturally to objects and arrays in most programming languages.
Today you will find JSON in:
- REST and GraphQL API request and response bodies
- Configuration files for tools, CI pipelines, and cloud services
- NoSQL databases that store documents
- Log and event streams structured for analysis
JSON vs JavaScript object literals
JavaScript code can look similar to JSON, but they are not the same:
| Feature | JSON | JavaScript object |
|---|---|---|
| Keys | Must be double-quoted strings | Can be unquoted identifiers |
| Trailing commas | Not allowed | Often allowed |
| Comments | Not allowed | // and /* */ allowed |
Functions, undefined | Not allowed | Allowed |
Copying JavaScript object syntax into a JSON-only system is a frequent source of parse errors. The rest of this course explains the rules JSON enforces.
Key takeaway
JSON is a strict, portable way to represent structured data as text. Learning its rules helps you read APIs, write configs, and debug invalid payloads confidently.