aeson-diff-1.0.0.1: Extract and apply patches to JSON documents.

Safe HaskellNone
LanguageHaskell2010

Data.Aeson.Pointer

Description

 

Synopsis

Documentation

newtype Pointer Source #

Pointer to a location in a JSON document.

Defined in RFC 6901 http://tools.ietf.org/html/rfc6901

Constructors

Pointer 

Fields

data Key Source #

Traverse a single layer of a JSON document.

Constructors

OKey Text

Traverse a Value with an Object constructor.

AKey Int

Traverse a Value with an Array constructor.

Instances

Eq Key Source # 

Methods

(==) :: Key -> Key -> Bool #

(/=) :: Key -> Key -> Bool #

Ord Key Source # 

Methods

compare :: Key -> Key -> Ordering #

(<) :: Key -> Key -> Bool #

(<=) :: Key -> Key -> Bool #

(>) :: Key -> Key -> Bool #

(>=) :: Key -> Key -> Bool #

max :: Key -> Key -> Key #

min :: Key -> Key -> Key #

Show Key Source # 

Methods

showsPrec :: Int -> Key -> ShowS #

show :: Key -> String #

showList :: [Key] -> ShowS #

ToJSON Key Source # 

Methods

toJSON :: Key -> Value #

toEncoding :: Key -> Encoding #

FromJSON Key Source # 

Methods

parseJSON :: Value -> Parser Key #

pointerFailure :: Path -> Value -> Result a Source #

Report an error following a pointer.

type Path = [Key] Source #

A sequence of Keys forms a path through a JSON document.

formatPointer :: Pointer -> Text Source #

Format a Pointer as described in RFC 6901.

get :: Pointer -> Value -> Result Value Source #

Get the value at a Path.