Values
JSONPathQuery(segments:Array<Element>)
A JSONPath query consists of a root identifier followed by a sequence of segments (possibly empty) with optional blank space between.
Each segment takes in an input node list (the first segment takes in the query value) and produces an output node list, which the next segment operates on in turn.
RelativeQuery(segments:Array<Element>)
Represents a JSONPath which is relative to the current node. Used by filter selectors.
ChildSegment(selectors:Array<Element>)
A child segment takes a sequence of selectors and selects zero or more children of the input value, producing a nodelist of the matching values.
DescendantSegment(selectors:Array<Element>)
A descendant segment recursively visits the input value and each of its descendants, producing a nodelist the values matching the provided selectors.
NameSelector(name:String)
Selects at most one member value of an object node whose name equals the provided member name, or nothing if there is no such value. Nothing is selected from non-objects.
WildcardSelector
Selects the nodes of all children of an object or array. Nothing is selected from primatives.
IndexSelector(index:Int)
Selects at most one array element value of an array node. Nothing is selected if the index lies outside the range of the array, or if the input node is not an array. A negative index selector counts from the array end backwards.
ArraySliceSelector(start:Int, end:Int, step:Int)
Selects a slice of an array node, from start to end, incremented by step.
FilterSelector(logicalExpression:Element)
Filter selectors iterate over objects or arrays, and evaluate a logical expression for each element or member, which decides if the node is selected.
LogicalOrExpr(elements:Array<Element>)
A boolean OR of each of the logical subexpressions.
LogicalAndExpr(elements:Array<Element>)
A boolean AND of each of the logical subexpressions.
LogicalNotExpr(element:Element)
A boolean NOT of the logical subexpression.
LogicalTestQueryExpr(element:Element)
A test expression which tests the result of a function expression. For boolean results, checks if the result is True. For Node results, checks if the result is non-empty.
LogicalComparisionExpr(compareA:Element, op:String, compareB:Element)
A comparsion expression evalutes multiple primitive values against each other. Comparables include PrimitiveLiterals, or SingularQuery, or FunctionExpression. Operators include: ==, !=, <, <=, >, >=
PrimitiveLiteralExpr(value:PrimitiveLiteral)
Either a number, string, true, false, or null.
FilterQuery(element:Element)
One of either JSONPathQuery (absolute) or RelativeQuery (relative).
SingularQuery(element:Element)
One of either JSONPathQuery (absolute) or RelativeQuery (relative), but Segments of these can only be Name or Index.
FunctionExpressionElement(name:String, arguments:Array<Element>)
A function expression which evaluates a named function extension. Arguments can be one of PrimitiveLiteral, FilterQuery, LogicalExpression, or FunctionExpression