Documentation
¶
Overview ¶
Package jsonpointer builds RFC 6901 JSON Pointer strings from mixed string and integer segments. Two separate packages (rules and validator) need this, and a circular-import-free home keeps the implementations from drifting.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Build ¶
Build constructs a JSON Pointer from mixed string (object keys) and int (array indices) segments. Empty input yields "" (the root pointer per RFC 6901), not "/".
Examples:
Build("plugins", 2, "name") -> "/plugins/2/name"
Build("a/b") -> "/a~1b"
Build("a~b") -> "/a~0b"
func Escape ¶
Escape implements RFC 6901 section 3 token escaping. Order matters: `~` must be escaped first, or the replacement `~1` from `/` → `~1` would itself get rewritten.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.