# Valid JSON Pointer parsing tests # Format: pointer -> indices (Mem:name, Nth:n, End) # Root pointer (empty string) -> [] # RFC 6901 Section 5 examples /foo -> [Mem:foo] /foo/0 -> [Mem:foo, Nth:0] / -> [Mem:] /a~1b -> [Mem:a/b] /c%d -> [Mem:c%d] /e^f -> [Mem:e^f] /g|h -> [Mem:g|h] /i\j -> [Mem:i\j] /k"l -> [Mem:k"l] / -> [Mem: ] /m~0n -> [Mem:m~n] # Array indices /0 -> [Nth:0] /1 -> [Nth:1] /10 -> [Nth:10] /123 -> [Nth:123] /999999 -> [Nth:999999] # End-of-array marker /- -> [End] /foo/- -> [Mem:foo, End] /arr/0/- -> [Mem:arr, Nth:0, End] # Multiple levels /a/b/c -> [Mem:a, Mem:b, Mem:c] /0/1/2 -> [Nth:0, Nth:1, Nth:2] /foo/0/bar/1 -> [Mem:foo, Nth:0, Mem:bar, Nth:1] # Escape sequences /~0 -> [Mem:~] /~1 -> [Mem:/] /~0~1 -> [Mem:~/] /~1~0 -> [Mem:/~] /~01 -> [Mem:~1] /a~0b~1c -> [Mem:a~b/c] # Empty member names // -> [Mem:, Mem:] /// -> [Mem:, Mem:, Mem:] /foo//bar -> [Mem:foo, Mem:, Mem:bar] # Special characters (not needing escaping) /hello world -> [Mem:hello world] /with spaces -> [Mem:with spaces] /unicode-\u00e9 -> [Mem:unicode-\u00e9]