jsonpath-0.3.0.0: Library to parse and execute JSONPath
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.JSONPath.Types

Synopsis

Documentation

data BeginningPoint Source #

Constructors

Root 
CurrentObject 

Instances

Instances details
Show BeginningPoint Source # 
Instance details

Defined in Data.JSONPath.Types

Methods

showsPrec :: Int -> BeginningPoint -> ShowS

show :: BeginningPoint -> String

showList :: [BeginningPoint] -> ShowS

Eq BeginningPoint Source # 
Instance details

Defined in Data.JSONPath.Types

data Condition Source #

Instances

Instances details
Show Condition Source # 
Instance details

Defined in Data.JSONPath.Types

Methods

showsPrec :: Int -> Condition -> ShowS

show :: Condition -> String

showList :: [Condition] -> ShowS

Eq Condition Source # 
Instance details

Defined in Data.JSONPath.Types

Methods

(==) :: Condition -> Condition -> Bool

(/=) :: Condition -> Condition -> Bool

data Comparable Source #

Instances

Instances details
Show Comparable Source # 
Instance details

Defined in Data.JSONPath.Types

Methods

showsPrec :: Int -> Comparable -> ShowS

show :: Comparable -> String

showList :: [Comparable] -> ShowS

Eq Comparable Source # 
Instance details

Defined in Data.JSONPath.Types

Methods

(==) :: Comparable -> Comparable -> Bool

(/=) :: Comparable -> Comparable -> Bool

data JSONPathElement Source #

A JSONPath is a list of JSONPathElements.

Constructors

KeyChild Text

'$.foo' or '$["foo"]'

IndexChild Int

'$[1]'

AnyChild

'$[*]'

Slice (Maybe Int) (Maybe Int) (Maybe Int)

'$[1:7]', '$[0:10:2]', '$[::2]', '$[::]', etc.

Union [UnionElement]

'$[0,1,9]' or '$[0, 1:2, "foo", "bar"]'

Filter FilterExpr

'$[?(.foo == 42)]', '$[?(.foo > @.bar)]', etc.

Search [JSONPathElement]

'$..foo.bar'

Instances

Instances details
Show JSONPathElement Source # 
Instance details

Defined in Data.JSONPath.Types

Methods

showsPrec :: Int -> JSONPathElement -> ShowS

show :: JSONPathElement -> String

showList :: [JSONPathElement] -> ShowS

Eq JSONPathElement Source # 
Instance details

Defined in Data.JSONPath.Types

data UnionElement Source #

Elements which can occur inside a union

Constructors

UEKeyChild Text 
UEIndexChild Int 
UESlice (Maybe Int) (Maybe Int) (Maybe Int) 

Instances

Instances details
Show UnionElement Source # 
Instance details

Defined in Data.JSONPath.Types

Methods

showsPrec :: Int -> UnionElement -> ShowS

show :: UnionElement -> String

showList :: [UnionElement] -> ShowS

Eq UnionElement Source # 
Instance details

Defined in Data.JSONPath.Types

Methods

(==) :: UnionElement -> UnionElement -> Bool

(/=) :: UnionElement -> UnionElement -> Bool

data FilterExpr Source #

Instances

Instances details
Show FilterExpr Source # 
Instance details

Defined in Data.JSONPath.Types

Methods

showsPrec :: Int -> FilterExpr -> ShowS

show :: FilterExpr -> String

showList :: [FilterExpr] -> ShowS

Eq FilterExpr Source # 
Instance details

Defined in Data.JSONPath.Types

Methods

(==) :: FilterExpr -> FilterExpr -> Bool

(/=) :: FilterExpr -> FilterExpr -> Bool

data SingularPathElement Source #

Constructors

Key Text 
Index Int 

Instances

Instances details
Show SingularPathElement Source # 
Instance details

Defined in Data.JSONPath.Types

Methods

showsPrec :: Int -> SingularPathElement -> ShowS

show :: SingularPathElement -> String

showList :: [SingularPathElement] -> ShowS

Eq SingularPathElement Source # 
Instance details

Defined in Data.JSONPath.Types

data SingularPath Source #

A JSONPath which finds at max one value, given a beginning point. Used by FilterExpr for ExistsExpr and ComparisonExpr.

Instances

Instances details
Show SingularPath Source # 
Instance details

Defined in Data.JSONPath.Types

Methods

showsPrec :: Int -> SingularPath -> ShowS

show :: SingularPath -> String

showList :: [SingularPath] -> ShowS

Eq SingularPath Source # 
Instance details

Defined in Data.JSONPath.Types

Methods

(==) :: SingularPath -> SingularPath -> Bool

(/=) :: SingularPath -> SingularPath -> Bool