A Rust JsonPath implementation based on the Java json-path/JsonPath project.
```rust use jsonpath::JsonPathQuery; use serdejson::json;
let object = json!({"greetings": "hello, jsonpath"}); let result = object.query("$.['greetings']"); asserteq!(Ok(json!("hello, json_path")), result); ```
| Operator | Description |
| :------------------------ | :------------------------------------------------------------------- |
| $
| The root element to query. This starts all path expressions. |
| @
| WIP, The current node being processed by a filter predicate. |
| *
| Wildcard. Available anywhere a name or numeric are required. |
| ..
| Deep scan. Available anywhere a name is required. |
| .<name>
| Dot-notated child |
| ['<name>' (, '<name>')]
| Bracket-notated child or children |
| [<number> (, <number>)]
| Array index or indexes |
| [start:end]
| Array slice operator |
| [?(<expression>)]
| WIP, Filter expression. Expression must evaluate to a boolean value. |
[1:]
slice from index 1 (inclusive) to the end[:-1]
slice from begining to the last item (exclusive)[1:10]
slice from 1 (inclusive) to 10 (exclusive)