What is JSON?
JSON (JavaScript Object Notation) is a lightweight, text-based format for representing structured data as key–value pairs and arrays. It is the de facto standard for web APIs and configuration because it is both human-readable and easy for machines to parse.
Despite the name, JSON is language-independent and supported everywhere. It represents objects, arrays, strings, numbers, booleans, and null.
Key points
- Represents objects, arrays, strings, numbers, booleans, and null.
- Keys must be double-quoted strings.
- No comments or trailing commas are allowed.
- Language-independent despite the JavaScript name.
Example
{ "name": "Ada", "active": true, "roles": ["admin"] }Common uses
- Request and response bodies in web APIs
- Configuration files (package.json, tsconfig.json)
- Storing and exchanging structured data
- NoSQL document storage
Work with JSON directly in your browser.
Open the JSON Formatter