package
0.4.0
Repository: https://github.com/theory/jsonpath.git
Documentation: pkg.go.dev

# Functions

Child creates and returns a Segment that uses one or more Selectors to select the children of a JSON value.
Comparison creates and returns a new ComparisonExpr.
Descendant creates and returns a Segment that uses one or more Selectors to select the children of a JSON value, together with the children of its children, and so forth recursively.
Existence returns a new ExistExpr.
Filter returns a new Filter.
FilterQuery creates and returns a new FilterQueryExpr.
Function creates an returns a new function expression that will execute fn against the return values of args.
Literal creates and returns a new LiteralArg.
LogicalFrom attempts to convert value to a LogicalType and panics if it cannot.
NodesFrom attempts to convert value to a NodesType and panics if it cannot.
Nonexistence returns a new NonExistExpr.
NotFunction creates an returns a new NotFuncExpr that will execute fn against the return values of args and return the inverses of its return value.
NotParen returns a new NotParenExpr.
Paren returns a new ParenExpr.
Query returns a new query consisting of segments.
SingularQuery creates and returns a SingularQueryExpr.
Slice creates a new SliceSelector.
Value returns a new ValueType.
ValueFrom attempts to convert value to a ValueType and panics if it cannot.

# Constants

==.
FuncLiteral.
FuncLogical.
FuncNodeList.
FuncSingularQuery.
FuncValue.
>.
>=.
<.
<=.
false.
true.
!=.
LogicalType.
NodesType.
ValueType.

# Variables

Wildcard is a wildcard selector, e.g., * or [*].

# Structs

ComparisonExpr represents the comparison of two values, which themselves may be the output of expressions.
ExistExpr represents an existence expression.
FilterQueryExpr represents a JSONPath Query used in a filter expression.
FilterSelector is a filter selector, e.g., ?().
FunctionExpr represents a function expression, consisting of a named function and its arguments.
LiteralArg represents a literal JSON value, excluding objects and arrays.
LocatedNode pairs a value with its location within the JSON query argument from which it was selected.
NonExistExpr represents a nonexistence expression.
NotFuncExpr represents a "!func()" expression.
NotParenExpr represents a parenthesized expression preceded with a !.
ParenExpr represents a parenthesized expression.
PathQuery represents a JSONPath expression.
Segment represents a single segment in an RFC 9535 JSONPath query, consisting of a list of Selectors and child Segments.
SingularQueryExpr represents a query that produces a single node (JSON value), or nothing.
SliceSelector is a slice selector, e.g., [0:100:5].
ValueType encapsulates a JSON value, which should be a string, integer, float, nil, true, false, []any, or map[string]any.
WildcardSelector is the underlying nil value used by [Wildcard].

# Interfaces

BasicExpr defines the interface for filter expressions.
CompVal defines the interface for comparable values in filter expressions.
FunctionExprArg defines the interface for function argument expressions.
JSONPathValue defines the interface for JSON path values.
NormalSelector represents a single selector in a normalized path.
PathFunction represents a JSONPath function.
Selector represents a single Selector in an RFC 9535 JSONPath query.

# Type aliases

CompOp defines the JSONPath filter comparison operators.
FuncType defines the function argument expressions and return types defined by [RFC 9535].
Index is an array index selector, e.g., [3].
LogicalAnd represents a list of one or more expressions ANDed together by the && operator.
LogicalOr represents a list of one or more expressions ORed together by the || operator.
LogicalType is a JSONPath type that represents true or false.
Name is a key name selector, e.g., .name or ["name"].
NodesType defines the JSONPath type representing a node list; in other words, a list of JSON values.
NormalizedPath represents a normalized path identifying a single value in a JSON query argument, as [defined by RFC 9535].
PathType represents the types of filter expression values.