ENES

JSON

The plain-text format programs use to hand each other structured data.

A JSON document with keys and values, read by programs in two different languages

JSON (JavaScript Object Notation, said "jason") is a text format for writing structured data: names with values, lists, and nested groups of them. A user might be {"name": "Ana", "age": 31, "languages": ["es", "en"]}. Humans can read it, every programming language can parse it, and it takes one line of code to turn it into an object you can work with.

It was born inside JavaScript in the early 2000s and spread because it is far simpler than XML, the format it replaced. Today nearly every web API answers in JSON, many configuration files are JSON (package.json, tsconfig.json), and databases like Amazon DynamoDB or MongoDB store documents that are essentially JSON.

It has only six kinds of value: string, number, true/false, null, array ([...]) and object ({...}). No dates, no comments, no trailing commas. That strictness is why it is so portable, and also why a single missing quote breaks the whole file. When size or speed matter more than readability, binary formats like Protocol Buffers or Parquet take over.

Keep in mind

Go deeper

Related terms

More in Software