What Is JSON?
JSON is a lightweight data format commonly used for API responses, config files, and frontend-backend data exchange. It is built from objects, arrays, strings, numbers, booleans, and null.
One-line Explanation
JSON is a text format for structured data that programs can parse and people can usually inspect.
When You See It
- API responses are often JSON when debugging requests.
- Config files, mock data, logs, and exported frontend state often use JSON.
- JSON is often used as a sample format when converting to YAML, entities, or Proto schemas.
How It Works
A JSON document usually starts with an object `{}` or an array `[]`. Objects contain key-value pairs, while arrays keep values in order.
Keys must be strings, and strings use double quotes. Numbers, true, false, and null are not quoted.
JSON describes data only. Comments, functions, dates, enums, and binary data need separate conventions.
Examples
Common JSON object
API responses and config snippets often look like this.
{
"name": "Nexkits",
"enabled": true,
"tags": ["tool", "json"]
}
Common Misunderstandings
- Standard JSON does not use single quotes for strings.
- JSON does not support comments. Commented variants are JSONC or custom config formats.
- IDs, phone numbers, and codes with leading zeros should usually stay strings, even if they look numeric.