# JSON

A text-based data-interchange syntax for representing objects, arrays, strings, numbers, booleans, and null across software systems.

- Type: term
- Domain: Engineering & architecture
- Level: Foundational
- Last reviewed: 2026-09-23
- Original: [Soroush’s Product Wiki](<https://wiki.soroush.uk/topic/json/>)

## What it means

JSON, or JavaScript Object Notation, is a language-independent text syntax for structured data. Its values are objects with string names, arrays, strings, numbers, true, false, or null. JSON defines syntax, not a domain schema, transport protocol, or guarantee that two systems interpret a value identically.

## Why it matters

JSON is widely supported by browsers, APIs, configuration tools, and programming languages, making data exchange relatively simple. Its small common model also forces teams to define how richer application types, validation rules, and compatibility are represented.

## When to use it

Use JSON when interoperable, human-readable structured text and broad tooling matter. Choose a binary format for tightly constrained size or processing needs, and use a format with different features when comments, references, mixed document content, or exact numeric types are essential.

## How it works

1. Map application data into JSON's limited set of value types.
2. Serialize the value as valid Unicode text with quoted object names and required escaping.
3. Transmit or store the text with an agreed character encoding and media type where applicable.
4. Parse untrusted input with limits, then validate its structure and domain rules against a contract or schema.
5. Map values into local types while handling missing fields, nulls, numbers, dates, and unknown properties deliberately.

## A practical example

An order API returns a JSON object containing an order identifier, an array of line items, and a status string. Its contract defines the identifier and money representations because valid JSON alone cannot say that a decimal is currency or that a string follows an allowed status set.

## Where it breaks

JSON has no native date, binary, decimal-money, or comment type, and object member ordering should not carry meaning. Large documents can be inefficient, duplicate names are unpredictable across parsers, and syntactic validity does not establish safety or semantic correctness.

## Common mistakes

- Assuming JSON is a protocol or API rather than a representation syntax.
- Using floating-point numbers for money without an explicit precision convention.
- Trusting parsed JSON without size limits, schema validation, and authorization checks.
- Changing field meanings or types while assuming tolerant parsers make the change compatible.

## Sources

1. [The JavaScript Object Notation \(JSON\) Data Interchange Format \(RFC 8259\)](<https://www.rfc-editor.org/rfc/rfc8259>) — RFC Editor · Internet Standard
2. [ECMA-404: The JSON Data Interchange Syntax](<https://ecma-international.org/publications-and-standards/standards/ecma-404/>) — Ecma International · International standard

## Related topics

- [Application Programming Interface \(API\)](<https://wiki.soroush.uk/topic/application-programming-interface/>)
- [Request and Response](<https://wiki.soroush.uk/topic/request-and-response/>)
- [HTTP](<https://wiki.soroush.uk/topic/http/>)
