Skip to main content

Module query

Module query 

Source
Expand description

RFC 9535-conformant JSONPath expression evaluation and path diagnostics.

This module bridges the span-aware JsonNode AST produced by the parser and the serde_json::Value type consumed by serde_json_path. Conversion is done on demand rather than storing a parallel representation, keeping the memory footprint proportional to the size of query results rather than the entire document.

Functions§

diagnostics_for_path
Validates a JSONPath expression syntactically without evaluating it against any document. Intended for live editor feedback where the user is still composing a query and no document context is available or needed.
evaluate_path
Evaluates a JSONPath expression against the parsed document AST, returning all matching nodes as a list of JsonNode values.