JSON — The Language of Data
Learn JSON, the universal format that APIs use to send and receive structured data between browsers and servers.
What Is JSON and Why Does It Exist?
When a server needs to send data to your browser, it can't just send a JavaScript object — that's a concept that only exists inside a running JavaScript program. The server and browser need a text format they both understand. That format is JSON (JavaScript Object Notation).
JSON was created to be human-readable and easy for machines to parse. Before JSON, the web used XML — a much more verbose format with opening and closing tags everywhere (like HTML). JSON won because it's dramatically simpler. Compare these two ways of representing a user:
XML: <user><name>Alice</name><age>25</age></user>
JSON: {"name": "Alice", "age": 25}
Today, JSON is the universal language of web APIs. When you fetch data from Instagram, Google Maps, Amazon, or any modern service, the server almost always responds with JSON. Learning to read and work with JSON is essential for data fetching.