hjsonpointer-0.1.0.1: JSON Pointer library for Haskell

Safe HaskellNone
LanguageHaskell2010

Data.JsonPointer

Synopsis

Documentation

newtype JsonPointer Source

Constructors

JsonPointer 

Fields

_unJsonPointer :: [Text]
 

data PointerErr Source

Constructors

InvalidFirstChar

The Text to build a JSON Pointer must either be empty or start with a /.

UnescapedTilde 
ObjectLookupFailed 
ArrayIndexInvalid 
ArrayElemNotFound 
UnindexableValue 

jsonPointer :: Text -> Either PointerErr JsonPointer Source

The Text to build a JSON Pointer must either be empty or start with a /. If you're turning a URI Fragment into a JSON Pointer you must drop the initial '#'.

resolveRefTok :: Value -> JsonPointer -> Either PointerErr (Value, JsonPointer) Source

For internal use and specialized applications that don't want to resolve the entire pointer at once.