What Is JSON?

JSON stands for JavaScript Object Notation. It is a lightweight text format used to represent structured data in a way that humans can read and machines can parse quickly.

Core ideas

Why JSON is popular

JSON is simple, language-independent, and compact enough for network transport. Teams use it for API requests and responses, configuration files, test fixtures, and cached application data.

Core JSON building blocks

A JSON document is built from objects, arrays, strings, numbers, booleans, and null. Objects use key-value pairs, while arrays store ordered lists of values.

Where developers use JSON

Frontend apps fetch JSON from REST APIs, backend services validate JSON payloads between systems, and tooling often stores settings and schemas in JSON because it is easy to inspect.

Examples

JSON object example

{
  "user": {
    "id": 101,
    "name": "Ada Lovelace",
    "active": true
  }
}

JSON array example

[
  {
    "id": 1,
    "role": "admin"
  },
  {
    "id": 2,
    "role": "editor"
  }
]

FAQ

Is JSON the same as JavaScript?

No. JSON is a data format inspired by JavaScript object syntax, but it is a language-independent text representation with stricter rules.

Can JSON contain comments?

Standard JSON does not support comments. If comments are required, teams usually use JSON5 or another configuration format instead.