Expand description
SQL/JSON Path implementation in Rust.
§Features
- Compatible with SQL/JSON Path standard and PostgreSQL implementation.
- Independent from JSON implementation. It supports popular libraries like
serde-json
,simd-json
andjsonbb
. Custom JSON types are also supported.
§Usage
use serde_json::{json, Value};
use sql_json_path::JsonPath;
let json = json!({"a": 1});
let path = JsonPath::new("$.a").unwrap();
let nodes = path.query(&json).unwrap();
assert_eq!(nodes.len(), 1);
assert_eq!(nodes[0].to_string(), "1");
Modules§
- json
- Abstraction over JSON values.
Structs§
- Json
Path - A JSON Path value.
- Parse
Error - The error type returned when parsing a JSON Path.
Enums§
- Eval
Error - The error type returned when evaluating a JSON path.