This is the markdown version of this page. It is the same content AI assistants and crawlers read.

Run a free AI Visibility Scan →
[Atomic Glue](atomicglue.co)
Glossary

JSON

JSON (JavaScript Object Notation) is a lightweight, human-readable data interchange format that uses key-value pairs and ordered lists.

Web developmentcategory4linked terms47mentioned

Definition

JSON is the de facto standard for data exchange on the web. It is everywhere: API responses, configuration files, database exports, and real-time messages. JSON was derived from JavaScript object literal syntax but is language-independent. Most programming languages have built-in JSON parsers and serializers. JSON supports six data types: strings, numbers, booleans, null, arrays (ordered lists), and objects (key-value maps). It does not support dates, functions, or binary data natively. These must be represented as strings or numbers and parsed by convention. JSON's simplicity is its superpower. It is easy for humans to read and write and trivial for machines to parse. That combination made it the successor to XML for most web communication.

How it works

JSON text is a serialized representation of data structures. A server sends JSON as the body of an HTTP response with `Content-Type: application/json`. The client parses it into native data structures. Serialization is the reverse: converting in-memory objects into JSON strings for transmission or storage.

JSON vs. XML

JSON is less verbose than XML. It has no closing tags, no namespaces, and no attributes (everything is a key or value). JSON is generally faster to parse and maps naturally to most programming languages' data structures. XML still wins for documents that need mixed content (text with embedded markup), schemas (XSD), or extensive metadata (namespaces). For most API use cases, JSON is the right choice.

Common misconception

JSON is not JavaScript. It is a text format that resembles JavaScript object syntax. You cannot store functions, undefined values, or JavaScript-specific objects in JSON. The `JSON.parse()` and `JSON.stringify()` methods handle the conversion safely. Never use `eval()` to parse JSON. It executes arbitrary code.

Note

JSON does not support comments. If you need comments, use JSON5 or switch to YAML for configuration files. For APIs, comments are not needed because the schema documents the structure.

In code

```json
{
  "user": {
    "id": 42,
    "name": "Alice",
    "email": "[email protected]",
    "roles": ["admin", "editor"],
    "active": true,
    "metadata": null
  }
}
```

Common questions

Q. Is JSON only for JavaScript?
A. No. JSON is language-agnostic. Every major programming language has JSON parsing libraries.
Q. What is the difference between JSON and a JavaScript object?
A. JSON is a string format. A JavaScript object is an in-memory data structure. JSON uses double quotes for keys and string values. JavaScript objects allow single quotes and unquoted keys.

Key takeaways

  • JSON is the standard data format for web APIs.
  • It supports strings, numbers, booleans, null, arrays, and objects.
  • JSON is language-independent, lightweight, and human-readable.

At a glance

Type
Data interchange format
MIME type
application/json
File extension
.json

How Atomic Glue helps

Atomic Glue designs clean API contracts using JSON. We optimize payload sizes and structure data for fast parsing. See our Analytics & Tracking services for data integration.

Get in touch

Underlined terms have their own entry. Selecting one shows it on the map below.

Atomic Glue. "JSON." Glossary.atomicglue.co/glossary/json

How JSON connects

JSON (JavaScript Object Notation) is a lightweight, human-readable data interchange format that uses key-value pairs and ordered lists.

Definition

JSON is the de facto standard for data exchange on the web. It is everywhere: API responses, configuration files, database exports, and real-time messages. JSON was derived from JavaScript object literal syntax but is language-independent. Most programming languages have built-in JSON parsers and serializers. JSON supports six data types: strings, numbers, booleans, null, arrays (ordered lists), and objects (key-value maps). It does not support dates, functions, or binary data natively. These must be represented as strings or numbers and parsed by convention. JSON's simplicity is its superpower. It is easy for humans to read and write and trivial for machines to parse. That combination made it the successor to XML for most web communication.

How it works

JSON text is a serialized representation of data structures. A server sends JSON as the body of an HTTP response with Content-Type: application/json. The client parses it into native data structures. Serialization is the reverse: converting in-memory objects into JSON strings for transmission or storage.

JSON vs. XML

JSON is less verbose than XML. It has no closing tags, no namespaces, and no attributes (everything is a key or value). JSON is generally faster to parse and maps naturally to most programming languages' data structures. XML still wins for documents that need mixed content (text with embedded markup), schemas (XSD), or extensive metadata (namespaces). For most API use cases, JSON is the right choice.

Common misconception

JSON is not JavaScript. It is a text format that resembles JavaScript object syntax. You cannot store functions, undefined values, or JavaScript-specific objects in JSON. The JSON.parse() and JSON.stringify() methods handle the conversion safely. Never use eval() to parse JSON. It executes arbitrary code.

Note

JSON does not support comments. If you need comments, use JSON5 or switch to YAML for configuration files. For APIs, comments are not needed because the schema documents the structure.

In code


```json
{
  "user": {
    "id": 42,
    "name": "Alice",
    "email": "[email protected]",
    "roles": ["admin", "editor"],
    "active": true,
    "metadata": null
  }
}

## Common questions

Q: Is JSON only for JavaScript?

A: No. JSON is language-agnostic. Every major programming language has JSON parsing libraries.

Q: What is the difference between JSON and a JavaScript object?

A: JSON is a string format. A JavaScript object is an in-memory data structure. JSON uses double quotes for keys and string values. JavaScript objects allow single quotes and unquoted keys.

Key takeaways:

- JSON is the standard data format for web APIs.

- It supports strings, numbers, booleans, null, arrays, and objects.

- JSON is language-independent, lightweight, and human-readable.

Schedule a call.

30 min · Video call

1
Date
2
Time
3
Details
Opens a lens that shows what AI reads on this page.