-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/

-- | Library to parse and execute JSONPath
--   
--   Please see the README on GitHub at
--   https://github.com/akshaymankar/jsonpath-hs#readme
@package jsonpath
@version 0.3.0.0

module Data.JSONPath.Types
data BeginningPoint
Root :: BeginningPoint
CurrentObject :: BeginningPoint
data Condition
Equal :: Condition
NotEqual :: Condition
GreaterThan :: Condition
SmallerThan :: Condition
GreaterThanOrEqual :: Condition
SmallerThanOrEqual :: Condition
data Comparable
CmpNumber :: Scientific -> Comparable
CmpString :: Text -> Comparable
CmpBool :: Bool -> Comparable
CmpNull :: Comparable
CmpPath :: SingularPath -> Comparable

-- | A JSONPath is a list of JSONPathElements.
data JSONPathElement

-- | '$.foo' or '$["foo"]'
KeyChild :: Text -> JSONPathElement

-- | '$[1]'
IndexChild :: Int -> JSONPathElement

-- | '$[*]'
AnyChild :: JSONPathElement

-- | '$[1:7]', '$[0:10:2]', '$[::2]', '$[::]', etc.
Slice :: Maybe Int -> Maybe Int -> Maybe Int -> JSONPathElement

-- | '$[0,1,9]' or '$[0, 1:2, "foo", "bar"]'
Union :: [UnionElement] -> JSONPathElement

-- | '$[?(.foo == 42)]', '$[?(.foo > @.bar)]', etc.
Filter :: FilterExpr -> JSONPathElement

-- | '$..foo.bar'
Search :: [JSONPathElement] -> JSONPathElement

-- | Elements which can occur inside a union
data UnionElement
UEKeyChild :: Text -> UnionElement
UEIndexChild :: Int -> UnionElement
UESlice :: Maybe Int -> Maybe Int -> Maybe Int -> UnionElement
data FilterExpr
ExistsExpr :: SingularPath -> FilterExpr
ComparisonExpr :: Comparable -> Condition -> Comparable -> FilterExpr
And :: FilterExpr -> FilterExpr -> FilterExpr
Or :: FilterExpr -> FilterExpr -> FilterExpr
Not :: FilterExpr -> FilterExpr
data SingularPathElement
Key :: Text -> SingularPathElement
Index :: Int -> SingularPathElement

-- | A JSONPath which finds at max one value, given a beginning point. Used
--   by FilterExpr for ExistsExpr and ComparisonExpr.
data SingularPath
SingularPath :: BeginningPoint -> [SingularPathElement] -> SingularPath
instance GHC.Classes.Eq Data.JSONPath.Types.BeginningPoint
instance GHC.Classes.Eq Data.JSONPath.Types.Comparable
instance GHC.Classes.Eq Data.JSONPath.Types.Condition
instance GHC.Classes.Eq Data.JSONPath.Types.FilterExpr
instance GHC.Classes.Eq Data.JSONPath.Types.JSONPathElement
instance GHC.Classes.Eq Data.JSONPath.Types.SingularPath
instance GHC.Classes.Eq Data.JSONPath.Types.SingularPathElement
instance GHC.Classes.Eq Data.JSONPath.Types.UnionElement
instance GHC.Internal.Show.Show Data.JSONPath.Types.BeginningPoint
instance GHC.Internal.Show.Show Data.JSONPath.Types.Comparable
instance GHC.Internal.Show.Show Data.JSONPath.Types.Condition
instance GHC.Internal.Show.Show Data.JSONPath.Types.FilterExpr
instance GHC.Internal.Show.Show Data.JSONPath.Types.JSONPathElement
instance GHC.Internal.Show.Show Data.JSONPath.Types.SingularPath
instance GHC.Internal.Show.Show Data.JSONPath.Types.SingularPathElement
instance GHC.Internal.Show.Show Data.JSONPath.Types.UnionElement

module Data.JSONPath.Parser
jsonPathElement :: Parser JSONPathElement
jsonPath :: Parser a -> Parser [JSONPathElement]

module Data.JSONPath.Execute
executeJSONPath :: [JSONPathElement] -> Value -> [Value]
executeJSONPathElement :: JSONPathElement -> Value -> Value -> [Value]

module Data.JSONPath
