Skip to content
JSON

JSON Pointer (RFC 6901)

Address a specific value by path.

#pointer#rfc6901

Code

json
// Document:
{ "foo": ["bar", "baz"], "": 0, "a/b": 1 }

// Pointers and resolved values:
""        -> the whole document
"/foo"    -> ["bar", "baz"]
"/foo/0"  -> "bar"
"/a~1b"   -> 1        (~1 escapes "/")
"/"       -> 0        (empty string key)