JSON Pointer (RFC 6901): Addressing Nested Values by Path
JSON Pointer (RFC 6901): address nested JSON values by path. Syntax, escaping rules, and how JSON Pointer is used in JSON Patch and JSON Schema.
Published:
Tags: json, developer-tools, advanced
JSON Pointer (RFC 6901): Addressing Nested Values by Path Every standard that needs to reference a specific location inside a JSON document — JSON Patch, JSON Schema fragments, OpenAPI discriminators, HTTP APIs that accept — uses JSON Pointer. It's the XPath of the JSON world, but far simpler: a single string that unambiguously identifies one value anywhere in a document. RFC 6901 - JSON Pointer defines the standard syntax for accessing JSON values and is implemented in 90%+ of JSON libraries. What is syntax? A JSON Pointer is a Unicode string starting with , followed by zero or more reference tokens separated by . Each token is either an object key or an array index (a non-negative integer with no leading zeros, except itself). The root pointer (empty string) is valid and refers to the…
All articles · theproductguy.in