Fundamentals
What is JSON and How It Works
JSON (JavaScript Object Notation) is a lightweight text format for representing structured data.
1. JSON basics
JSON is built from a small set of types: objects, arrays, strings, numbers, booleans and null.
{
"name": "Alice",
"age": 30,
"languages": ["English", "Hindi"],
"active": true
}
2. JSON vs JavaScript objects
JSON syntax looks like a JavaScript object, but it is always a string that needs to be parsed.
3. When to use JSON
Use JSON for API responses, configuration files, logs and messages between services.
- REST and GraphQL APIs
- Microservice communication
- Frontend–backend data exchange
Related tools
- JSON Beautifier – validate and format JSON.
- JSON Diff – compare two JSON values.
- JSONPath Tester – query nested JSON fields.