jsonpath-0.2.0.0: src/Data/JSONPath/Types.hs
module Data.JSONPath.Types
( BeginningPoint(..)
, Condition(..)
, Literal(..)
, JSONPathElement(..)
, SliceElement(..)
, module Data.JSONPath.ExecutionResult
)
where
import Data.Text
import Data.JSONPath.ExecutionResult
data BeginningPoint = Root
| CurrentObject
deriving (Show, Eq)
data Condition = Equal
| NotEqual
| GreaterThan
| SmallerThan
deriving (Show, Eq)
data Literal = LitNumber Int
| LitString Text
deriving (Show, Eq)
data SliceElement = SingleIndex Int
| SimpleSlice Int Int
| SliceWithStep Int Int Int
| SliceTo Int
| SliceToWithStep Int Int
| SliceFrom Int
| SliceFromWithStep Int Int
| SliceWithOnlyStep Int
deriving (Show, Eq)
data JSONPathElement = KeyChild Text
| KeyChildren [Text]
| AnyChild
| Slice SliceElement
| SliceUnion SliceElement SliceElement
| Filter BeginningPoint [JSONPathElement] Condition Literal
| Search [JSONPathElement]
deriving (Show, Eq)