[Atomic Glue](atomicglue.co)
WEB DEVELOPMENT
Home › Glossary › Web Development· 228 ·

JSON

\ˈdʒeɪsən\n.
Filed underWeb DevelopmentApisAnalytics
In brief · quick answer

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

§ 1 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.

§ 2 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.

§ 3 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.

§ 4 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.

§ 5 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.

§ 6 In code

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

§ 7 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.
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
# JSON

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

Category: Web Development (also: Apis, Analytics)

Author: Atomic Glue Team

## 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](/glossary/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

## 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

## Related entries


Last updated June 2026. Permalink: atomicglue.co/glossary/json

Schedule a call

30 min · Video call

1
Date
2
Time
3
Details