jsop-0.1.0.0: Cherry picking in JSON objects

Safe HaskellNone
LanguageHaskell2010

JSOP.Parse

Synopsis

Documentation

data Parser p a Source #

A parser that can handle missing values

Constructors

Parser 

required :: p -> Preview a -> Parser p a Source #

shortcut for a parser that handle missing values

optional :: p -> a -> Preview a -> Parser p a Source #

shortcut for parsers that have a default if value is missing

data ParseGIssue Source #

what wrong can happen

Instances
Eq ParseGIssue Source # 
Instance details

Defined in JSOP.Parse

Show ParseGIssue Source # 
Instance details

Defined in JSOP.Parse

jSOP Source #

Arguments

:: (All Typeable xs, IsProductType a xs) 
=> (path -> [Text]) 
-> NP (Parser path) xs

parsers for the indexed subvalues

-> Value

json structure

-> Either ParseGIssue a 

parseSField :: forall a p. Typeable a => Parser p a -> K (Int, Maybe Value) a -> Either ParseGIssue a Source #

treequery :: Paths -> Value -> ([(Int, Value)], [Int]) Source #

getValues :: (p -> [Text]) -> [p] -> Value -> [Maybe Value] Source #

close over paths argument to get an efficient Value -> [Maybe Value]