Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
Pointer to a location in a JSON document.
Defined in RFC 6901 http://tools.ietf.org/html/rfc6901
Pointer | |
|
Representing pointers
formatPointer :: Pointer -> Text Source #
Format a Pointer
as described in RFC 6901.
>>>
formatPointer (Pointer [])
"">>>
formatPointer (Pointer [OKey ""])
"/">>>
formatPointer (Pointer [OKey " "])
"/ ">>>
formatPointer (Pointer [OKey "foo"])
"/foo">>>
formatPointer (Pointer [OKey "foo", AKey 0])
"/foo/0">>>
formatPointer (Pointer [OKey "a/b"])
"/a~1b">>>
formatPointer (Pointer [OKey "c%d"])
"/c%d">>>
formatPointer (Pointer [OKey "e^f"])
"/e^f">>>
formatPointer (Pointer [OKey "g|h"])
"/g|h">>>
formatPointer (Pointer [OKey "i\\j"])
"/i\\j">>>
formatPointer (Pointer [OKey "k\"l"])
"/k\"l">>>
formatPointer (Pointer [OKey "m~n"])
"/m~0n"