Crate sql_json_path

Source
Expand description

SQL/JSON Path implementation in Rust.

§Features

§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§

JsonPath
A JSON Path value.
ParseError
The error type returned when parsing a JSON Path.

Enums§

EvalError
The error type returned when evaluating a JSON path.