Visual RFC.
ALL RFCs / RFC 8259
Read the RFC ↗

RFC 8259 / START HERE

JSON, before the details

JSON: JavaScript Object Notation

JSON is a text format for structured data: objects, arrays, strings, numbers, and a few simple values. It is used far beyond JavaScript.

The idea in one picture

  1. An app has structured values

  2. JSON writes them as text

  3. Another app reads the values

A simplified picture of the idea; the chapters explain the actual mechanisms.

Why it exists

Applications written in different languages need a small, widely understood way to exchange structured information.

A familiar example

A weather API returns an object containing a city name, temperature, and forecast list.

Helpful background

You can start here without reading another RFC. If these ideas are unfamiliar, these short introductions may help.

What you’ll learn next

Begin with chapter one, or choose a topic.

  1. A tree of JSON valuesA JSON text is one value with optional surrounding whitespace, and that value can contain nested values.
  2. Objects and arraysObject members map string names to values. Arrays retain an ordered sequence of elements.
  3. Strings and UnicodeQuotes delimit strings; escapes represent special characters without changing the intended string value.
  4. Numbers and precisionThe grammar allows decimal numbers with optional minus, fraction, and exponent, but implementations have numeric limits.
  5. Parsing and generatingA parser builds an internal representation from text. A generator must produce text that strictly follows JSON grammar.
  6. Interoperability checksSmall choices around names, strings, numeric limits, and media type determine whether independent implementations agree.
Start with chapter one →

This introduction explains RFC 8259 (2017). Read the original RFC ↗