JSON
Also known as: JSON file, .json, JavaScript Object Notation
JSON (JavaScript Object Notation) is a lightweight, text-based format for storing and exchanging structured data as key/value pairs and ordered lists. It is human-readable, language-independent, and the default format for most web APIs and config files.
- Text-based, language-independent data format
- Built from objects (key/value) and arrays (lists)
- The default format for most modern web APIs
How JSON is structured
JSON represents data with two building blocks: objects — unordered collections of `"key": value` pairs wrapped in curly braces — and arrays, ordered lists wrapped in square brackets. Values can be strings, numbers, booleans, `null`, nested objects, or arrays.
Because it is plain text, a `.json` file opens in any editor and is easy for both people and programs to read. That simplicity is why it became the common language web apps use to send data back and forth.
JSON vs XML
JSON and XML both carry structured data, but JSON is lighter: it skips closing tags and uses a compact bracket syntax, so the same data is usually smaller and faster to parse. XML supports attributes, comments, and schemas that JSON lacks.
For web APIs and app settings, JSON has largely become the default; XML still appears in documents, feeds, and older enterprise systems.