Breadcrumbs

JsonPointer

JSON Pointer (RFC 6901) denotes an expression which identifies a specific part of a JSON document, i.e. it specifies the path from the root of the document to that part of interest.

JSON Document

JavaScript
{
    "foo" : ["bar", "baz"],
    "pi" : 3.1416
}

JSON Pointer expressions

JavaScript
"/foo" → [ "bar", "baz" ]
"/foo/0" → "bar"
"/foo/1" → "baz"
"/pi" → 3.1416

The JsonDiff RFC 6902 patch document identifies the differing parts of two documents using this notation.

Operations

image-20251030-134406.png

There are two polymorphic operations that both retrieve a part of JSON document by evaluating the pointer. One operation expects the JSON document as String argument, the other expects a CacheId for the document, previously obtained from the Json Document Cache.

📗

Related Pages:

📘