Expand description
jpx-core: A complete JMESPath implementation using serde_json::Value.
This crate provides a JMESPath parser, interpreter, and runtime that works
directly with serde_json::Value, eliminating the need for a separate
Variable type and the conversion overhead that comes with it.
§Quick Start
use jpx_core::compile;
use serde_json::json;
let expr = compile("foo.bar").unwrap();
let data = json!({"foo": {"bar": true}});
let result = expr.search(&data).unwrap();
assert_eq!(result, json!(true));Re-exports§
pub use crate::interpreter::SearchResult;pub use crate::registry::Category;pub use crate::registry::Feature;pub use crate::registry::FunctionInfo;pub use crate::registry::FunctionRegistry;pub use crate::value_ext::JmespathType;pub use crate::value_ext::ValueExt;
Modules§
- ast
- JMESPath Abstract Syntax Tree.
- extensions
- Extension functions for JMESPath.
- functions
- JMESPath functions.
- interpreter
- Interprets JMESPath expressions.
- query_
library - Named Query Library parser for
.jpxfiles. - registry
- Function registry for runtime control and introspection.
- value_
ext - Extension trait for
serde_json::Valueproviding JMESPath operations.
Macros§
Structs§
- Context
- Context object used during expression evaluation.
- Expression
- A compiled JMESPath expression.
- Jmespath
Error - A JMESPath error with position information.
- Runtime
- Compiles JMESPath expressions and manages registered functions.
- Runtime
Builder - Builder for creating a Runtime with selective function registration.
Enums§
- Error
Reason - The reason for a JMESPath error.
- Runtime
Error - Runtime errors that can occur during expression evaluation.
Statics§
- DEFAULT_
RUNTIME - The default runtime with all 26 built-in JMESPath functions registered.
Functions§
- compile
- Compiles a JMESPath expression using the default Runtime.
- get_
expref_ id - Extracts the expref ID from a sentinel value.
- parse
- Parses a JMESPath expression into an AST.
Type Aliases§
- Parse
Result - Result of parsing an expression.