aeson-jsonpath-0.3.0.2: Parse and run JSONPath queries on Aeson documents
Copyright(c) 2024-2025 Taimoor Zaeem
LicenseMIT
MaintainerTaimoor Zaeem <mtaimoorzaeem@gmail.com>
StabilityExperimental
PortabilityPortable
Safe HaskellNone
LanguageHaskell2010

Data.Aeson.JSONPath.Types

Description

This module contains all the data structures related to JSONPath

Documentation

data Query Source #

Instances

Instances details
Show Query Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Query

Methods

showsPrec :: Int -> Query -> ShowS

show :: Query -> String

showList :: [Query] -> ShowS

Eq Query Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Query

Methods

(==) :: Query -> Query -> Bool

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

Lift Query Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Query

Methods

lift :: Quote m => Query -> m Exp

liftTyped :: forall (m :: Type -> Type). Quote m => Query -> Code m Query

data QueryType Source #

Constructors

Root 
Current 

Instances

Instances details
Show QueryType Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Query

Methods

showsPrec :: Int -> QueryType -> ShowS

show :: QueryType -> String

showList :: [QueryType] -> ShowS

Eq QueryType Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Query

Methods

(==) :: QueryType -> QueryType -> Bool

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

Lift QueryType Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Query

Methods

lift :: Quote m => QueryType -> m Exp

liftTyped :: forall (m :: Type -> Type). Quote m => QueryType -> Code m QueryType

data QueryState Source #

Constructors

QueryState 

Fields

data Segment a Source #

Constructors

Bracketed [Selector a] 
Dotted Text 
WildcardSegment 

Instances

Instances details
Lift a => Lift (Segment a :: Type) Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Segment

Methods

lift :: Quote m => Segment a -> m Exp

liftTyped :: forall (m :: Type -> Type). Quote m => Segment a -> Code m (Segment a)

Show a => Show (Segment a) Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Segment

Methods

showsPrec :: Int -> Segment a -> ShowS

show :: Segment a -> String

showList :: [Segment a] -> ShowS

Eq a => Eq (Segment a) Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Segment

Methods

(==) :: Segment a -> Segment a -> Bool

(/=) :: Segment a -> Segment a -> Bool

data QuerySegment a Source #

Constructors

QuerySegment 

Instances

Instances details
Lift a => Lift (QuerySegment a :: Type) Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Segment

Methods

lift :: Quote m => QuerySegment a -> m Exp

liftTyped :: forall (m :: Type -> Type). Quote m => QuerySegment a -> Code m (QuerySegment a)

Show a => Show (QuerySegment a) Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Segment

Methods

showsPrec :: Int -> QuerySegment a -> ShowS

show :: QuerySegment a -> String

showList :: [QuerySegment a] -> ShowS

Eq a => Eq (QuerySegment a) Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Segment

Methods

(==) :: QuerySegment a -> QuerySegment a -> Bool

(/=) :: QuerySegment a -> QuerySegment a -> Bool

data SegmentType Source #

Constructors

Child 
Descendant 

Instances

Instances details
Show SegmentType Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Segment

Methods

showsPrec :: Int -> SegmentType -> ShowS

show :: SegmentType -> String

showList :: [SegmentType] -> ShowS

Eq SegmentType Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Segment

Methods

(==) :: SegmentType -> SegmentType -> Bool

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

Lift SegmentType Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Segment

Methods

lift :: Quote m => SegmentType -> m Exp

liftTyped :: forall (m :: Type -> Type). Quote m => SegmentType -> Code m SegmentType

data Selector a Source #

Constructors

Name Text 
Index Int 
ArraySlice (Maybe Int, Maybe Int, Int) 
Filter (LogicalOrExpr a) 
WildcardSelector 

Instances

Instances details
Lift a => Lift (Selector a :: Type) Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Selector

Methods

lift :: Quote m => Selector a -> m Exp

liftTyped :: forall (m :: Type -> Type). Quote m => Selector a -> Code m (Selector a)

Show a => Show (Selector a) Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Selector

Methods

showsPrec :: Int -> Selector a -> ShowS

show :: Selector a -> String

showList :: [Selector a] -> ShowS

Eq a => Eq (Selector a) Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Selector

Methods

(==) :: Selector a -> Selector a -> Bool

(/=) :: Selector a -> Selector a -> Bool

data Literal Source #

Constructors

LitString Text 
LitNum Scientific 
LitBool Bool 
LitNull 

Instances

Instances details
Show Literal Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Filter

Methods

showsPrec :: Int -> Literal -> ShowS

show :: Literal -> String

showList :: [Literal] -> ShowS

Eq Literal Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Filter

Methods

(==) :: Literal -> Literal -> Bool

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

Lift Literal Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Filter

Methods

lift :: Quote m => Literal -> m Exp

liftTyped :: forall (m :: Type -> Type). Quote m => Literal -> Code m Literal

newtype LogicalOrExpr a Source #

Constructors

LogicalOr [LogicalAndExpr a] 

Instances

Instances details
Lift a => Lift (LogicalOrExpr a :: Type) Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Filter

Methods

lift :: Quote m => LogicalOrExpr a -> m Exp

liftTyped :: forall (m :: Type -> Type). Quote m => LogicalOrExpr a -> Code m (LogicalOrExpr a)

Show a => Show (LogicalOrExpr a) Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Filter

Methods

showsPrec :: Int -> LogicalOrExpr a -> ShowS

show :: LogicalOrExpr a -> String

showList :: [LogicalOrExpr a] -> ShowS

Eq a => Eq (LogicalOrExpr a) Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Filter

Methods

(==) :: LogicalOrExpr a -> LogicalOrExpr a -> Bool

(/=) :: LogicalOrExpr a -> LogicalOrExpr a -> Bool

newtype LogicalAndExpr a Source #

Constructors

LogicalAnd [BasicExpr a] 

Instances

Instances details
Lift a => Lift (LogicalAndExpr a :: Type) Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Filter

Methods

lift :: Quote m => LogicalAndExpr a -> m Exp

liftTyped :: forall (m :: Type -> Type). Quote m => LogicalAndExpr a -> Code m (LogicalAndExpr a)

Show a => Show (LogicalAndExpr a) Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Filter

Methods

showsPrec :: Int -> LogicalAndExpr a -> ShowS

show :: LogicalAndExpr a -> String

showList :: [LogicalAndExpr a] -> ShowS

Eq a => Eq (LogicalAndExpr a) Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Filter

Methods

(==) :: LogicalAndExpr a -> LogicalAndExpr a -> Bool

(/=) :: LogicalAndExpr a -> LogicalAndExpr a -> Bool

data BasicExpr a Source #

Instances

Instances details
Lift a => Lift (BasicExpr a :: Type) Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Filter

Methods

lift :: Quote m => BasicExpr a -> m Exp

liftTyped :: forall (m :: Type -> Type). Quote m => BasicExpr a -> Code m (BasicExpr a)

Show a => Show (BasicExpr a) Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Filter

Methods

showsPrec :: Int -> BasicExpr a -> ShowS

show :: BasicExpr a -> String

showList :: [BasicExpr a] -> ShowS

Eq a => Eq (BasicExpr a) Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Filter

Methods

(==) :: BasicExpr a -> BasicExpr a -> Bool

(/=) :: BasicExpr a -> BasicExpr a -> Bool

newtype TestExpr a Source #

Constructors

FilterQuery a 

Instances

Instances details
Lift a => Lift (TestExpr a :: Type) Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Filter

Methods

lift :: Quote m => TestExpr a -> m Exp

liftTyped :: forall (m :: Type -> Type). Quote m => TestExpr a -> Code m (TestExpr a)

Show a => Show (TestExpr a) Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Filter

Methods

showsPrec :: Int -> TestExpr a -> ShowS

show :: TestExpr a -> String

showList :: [TestExpr a] -> ShowS

Eq a => Eq (TestExpr a) Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Filter

Methods

(==) :: TestExpr a -> TestExpr a -> Bool

(/=) :: TestExpr a -> TestExpr a -> Bool

data ComparisonExpr Source #

Instances

Instances details
Show ComparisonExpr Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Filter

Methods

showsPrec :: Int -> ComparisonExpr -> ShowS

show :: ComparisonExpr -> String

showList :: [ComparisonExpr] -> ShowS

Eq ComparisonExpr Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Filter

Lift ComparisonExpr Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Filter

Methods

lift :: Quote m => ComparisonExpr -> m Exp

liftTyped :: forall (m :: Type -> Type). Quote m => ComparisonExpr -> Code m ComparisonExpr

data ComparisonOp Source #

Instances

Instances details
Show ComparisonOp Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Filter

Methods

showsPrec :: Int -> ComparisonOp -> ShowS

show :: ComparisonOp -> String

showList :: [ComparisonOp] -> ShowS

Eq ComparisonOp Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Filter

Methods

(==) :: ComparisonOp -> ComparisonOp -> Bool

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

Lift ComparisonOp Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Filter

Methods

lift :: Quote m => ComparisonOp -> m Exp

liftTyped :: forall (m :: Type -> Type). Quote m => ComparisonOp -> Code m ComparisonOp

data Comparable Source #

Instances

Instances details
Show Comparable Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Filter

Methods

showsPrec :: Int -> Comparable -> ShowS

show :: Comparable -> String

showList :: [Comparable] -> ShowS

Eq Comparable Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Filter

Methods

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

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

Lift Comparable Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Filter

Methods

lift :: Quote m => Comparable -> m Exp

liftTyped :: forall (m :: Type -> Type). Quote m => Comparable -> Code m Comparable

data SingularQueryType Source #

Constructors

RootSQ 
CurrentSQ 

Instances

Instances details
Show SingularQueryType Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Filter

Methods

showsPrec :: Int -> SingularQueryType -> ShowS

show :: SingularQueryType -> String

showList :: [SingularQueryType] -> ShowS

Eq SingularQueryType Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Filter

Lift SingularQueryType Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Filter

Methods

lift :: Quote m => SingularQueryType -> m Exp

liftTyped :: forall (m :: Type -> Type). Quote m => SingularQueryType -> Code m SingularQueryType

data SingularQuery Source #

Instances

Instances details
Show SingularQuery Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Filter

Methods

showsPrec :: Int -> SingularQuery -> ShowS

show :: SingularQuery -> String

showList :: [SingularQuery] -> ShowS

Eq SingularQuery Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Filter

Lift SingularQuery Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Filter

Methods

lift :: Quote m => SingularQuery -> m Exp

liftTyped :: forall (m :: Type -> Type). Quote m => SingularQuery -> Code m SingularQuery

data SingularQuerySegment Source #

Constructors

NameSQSeg Text 
IndexSQSeg Int 

Instances

Instances details
Show SingularQuerySegment Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Filter

Methods

showsPrec :: Int -> SingularQuerySegment -> ShowS

show :: SingularQuerySegment -> String

showList :: [SingularQuerySegment] -> ShowS

Eq SingularQuerySegment Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Filter

Lift SingularQuerySegment Source # 
Instance details

Defined in Data.Aeson.JSONPath.Types.Filter

Methods

lift :: Quote m => SingularQuerySegment -> m Exp

liftTyped :: forall (m :: Type -> Type). Quote m => SingularQuerySegment -> Code m SingularQuerySegment