module Schematrix::Pointer

Escaping of one JSON pointer token inside a URI fragment. Schema keys are folded into locator fragments, where “/” separates containment levels and “%” starts an escape: a key carrying either would change the pointer’s shape or leave the locator string unparseable. Escaping makes every fragment a valid URI whose tokens decode back to the original keys; unescaping reverses it per token, percent layer first (a document author’s %7E1 means the pointer escape ~1), then the JSON pointer layer. A key’s own ~ and / land as ~0/~1 before the percent pass, so they decode exactly once.