You open a API response and see {"name":"Ada","age":36}. That curly-brace text is JSON. This post explains what it is and why it is everywhere.
1. What is JSON
JSON (JavaScript Object Notation) is a lightweight data format for exchanging information between systems. Despite the name, it is language-independent — Python, Java, Go, you name it, all read and write JSON.
2. Its basic types
- Object:
{ "key": value }— an unordered set of key/value pairs. - Array:
[ value, value ]— an ordered list. - String:
"text" - Number:
36,3.14 - Boolean:
true/false - Null:
null
Values can nest: an object can hold an array that holds objects.
3. Why everyone uses it
JSON is text, so it travels over HTTP easily. It maps almost 1:1 to native data structures (dicts, lists), so parsing is trivial. That is why REST APIs, config files and NoSQL databases default to JSON.
4. Formatting and validating
API JSON is often one long line — hard to read. Formatting indents it by hierarchy; minifying strips spaces to shrink it. Validating checks the syntax is correct (balanced braces, quoted keys).
Use Jisubao's free tool: paste JSON, click Format or Minify, and it tells you if the syntax is invalid. It runs locally in your browser.
5. Common mistakes
- Keys must be double-quoted strings:
{name: "Ada"}is invalid,{"name":"Ada"}is valid. - No trailing commas:
{"a":1,}breaks in strict parsers. - No comments inside JSON.
👉 Try it now: Jisubao JSON Formatter →