DocumentFilter

A condition on a whole document, which limits a JsonPathQuery to the documents that meet it (JsonPathQuery.documentFilter, SPEC.md §10.5): an RFC 9535 logical expression, what a filter selector holds after its ?, evaluated once on each document with both @ and $ standing for the document's root.

@.kind == 'order' && @.version >= 2 keeps the documents whose root has those members, which a path alone can't say: RFC 9535 filters test the children of a node, never the root itself. The whole filter grammar applies: comparisons, existence tests, !, &&, ||, parentheses, queries with nested filters, and the functions of JsonPath. A comparison of a root member with a literal narrows the search through the index as the path's own filters do.

Compile once, then use it in any number of queries. Immutable and thread-safe; two filters are equal when their texts are.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

What in the filter is valid but can't be what was meant, in the order of the text, as JsonPath.warnings has for a query; offsets are in the filter's text.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String