Crates.io | rsonpath-syntax |
lib.rs | rsonpath-syntax |
version | 0.3.1 |
source | src |
created_at | 2024-01-10 15:56:14.300724 |
updated_at | 2024-03-28 18:14:52.874592 |
description | A JSONPath parser. |
homepage | |
repository | https://github.com/V0ldek/rsonpath |
max_upload_size | |
id | 1095349 |
size | 252,299 |
rsonpath-syntax
– JSONPath parserComplete, fast, and fully spec-compliant JSONPath query parser.
Parse a query to its AST with the parse
function.
let query = rsonpath_syntax::parse("$.jsonpath[*]")?;
For advanced usage consult the crate documentation.
There are two optional features:
arbitrary
, which enables a dependency on the arbitrary
crate to provide Arbitrary
implementations on query types; this is used e.g. for fuzzing.color
, which enables a dependency on the owo_colors
crate to provide colorful Display
representations of ParseError
with the colored
function.There are two examples programs, builder
showcases usage of the JsonPathQueryBuilder
struct; cli
is a small CLI tool that takes one argument, a query to parse, and prints a debug representation of the result query, or an error message – this is useful for debugging when developing the crate itself.
This is an in-development version that supports only name, index, and wildcard selectors. However, these are fully supported, tested, and fuzzed. The planned roadmap is: