pydantic_jsonpointer.types¶
pydantic_jsonpointer.types ¶
JsonPointer ¶
Bases: str
RFC 6901 JSON Pointer.
A JSON Pointer is either the empty string (referencing the whole document)
or a sequence of reference tokens each prefixed by /.
Construct from a raw string, from individual tokens, or by chaining
the / operator::
ptr = JsonPointer("/foo/0")
ptr = JsonPointer.from_tokens("foo", 0)
ptr = JsonPointer() / "foo" / 0
from_tokens
classmethod
¶
Build a pointer from unescaped reference tokens.
Tokens are escaped per RFC 6901 (~ -> ~0, / -> ~1).