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

RFC 6901 / START HERE

JSON Pointer, before the details

JSON Pointer: JSON means JavaScript Object Notation. Pointer names a path to a value, not a memory address.

JSON Pointer is a small notation for identifying one value inside a JSON document. It starts at the whole document and follows names or array positions separated by slashes.

The idea in one picture

  1. Start at the JSON root

  2. Follow names or indices

  3. Identify one existing value

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

Why it exists

Programs need a precise way to identify one nested value without inventing a different path notation for every task. Escaping rules keep names containing slashes or tildes distinct from the path structure.

A familiar example

In a settings object, /profile/name can identify the name inside profile. A missing member causes evaluation to fail; a pointer does not create values, edit the document, or grant permission to access its contents.

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. Start at the rootAn empty pointer selects the whole document. Each slash-prefixed token then selects one child value.
  2. Decode slash and tildeDecode ~1 as slash, then ~0 as tilde, after splitting the pointer into tokens.
  3. Select an array elementAn array interprets a token as a zero-based index, with strict rules for its spelling and bounds.
  4. Unwrap a JSON string firstA pointer stored as a JSON string must pass through JSON string decoding before pointer evaluation.
  5. Decode a URI fragmentA URI fragment can carry a percent-encoded JSON Pointer only when its media type explicitly defines that interpretation.
Start with chapter one →

This introduction explains RFC 6901 (2013). Read the original RFC ↗