Learn JSON Pointer
RFC 6901 — a plain string path that names exactly one value.
Basics
- What is a JSON Pointer? A JSON Pointer (RFC 6901) is a string that names exactly one value in a document. Every step starts with /…
- Keys & array indexes The same /token syntax indexes arrays: use the zero-based position. Numbers aren't special on objects —…
Special characters
- Escaping / and ~ A key may contain / or ~, but both have a meaning inside a pointer, so they are written ~1 (for /) and ~0…
When it doesn't work
- Missing values & bad pointers A pointer names exactly one value. If nothing is there, that is an error here (JSONPath, by contrast,…
- What pointers can't do A pointer names one exact location. There is no negative index, no wildcard and no filter — for those, use…
Reference
- Where pointers are used You'll meet JSON Pointers outside this site more often than you might expect.