PRACTICAL GUIDE

Find an Exact Value With JSON Pointer

Select a value from a JSON document using a standard slash-separated JSON Pointer.

Begin at the document root

An empty pointer selects the whole document. Otherwise, start with a slash and follow each key in order. The syntax addresses a specific value; it is not JSONPath and does not support wildcards, filtering or recursive searches.

Use zero-based array indices

The first item in an array has index 0. A pointer such as /users/0/name follows the users property, enters its first element and reads name. Leading-zero array indices are rejected, and a missing value produces an error instead of returning an invented result.

Escape slashes and tildes in keys

Use ~1 for a slash inside a property name and ~0 for a tilde. These escapes are part of JSON Pointer and are separate from JSON string escaping. The tool accepts string-form pointers, not URI fragments beginning with a hash.

Keep numeric precision in mind

The JSON is parsed by JavaScript. Large integer identifiers should be represented as strings if every digit matters. The lookup preserves JSON types but cannot recover digits already rounded while parsing an unquoted number.

Put it into practice