Learn JSON Pointer

RFC 6901 — a plain string path that names exactly one value.

The JSON Pointer cheat sheet

Basics

  1. 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 /…
  2. Keys & array indexes The same /token syntax indexes arrays: use the zero-based position. Numbers aren't special on objects —…

Special characters

  1. 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

  1. Missing values & bad pointers A pointer names exactly one value. If nothing is there, that is an error here (JSONPath, by contrast,…
  2. 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

  1. Where pointers are used You'll meet JSON Pointers outside this site more often than you might expect.

About jsonquery

Query, format and learn JSON with jq, JSONPath, JMESPath and JSON Pointer. It is the engine of the desktop app, run in your browser.

Engine
The desktop app’s, compiled to WebAssembly
Licence
MIT (the engine and the app)
Source
GitHub
Contact
The contact form (private)
Public issues
GitHub
Legal
Privacy policy

Known limitations: a file over 10 MB opens read-only and one over 512 MB does not open here; the desktop app has no such limit.