jsonpath-rust 1.0.4

The library provides the basic functionality to find the set of the data according to the filtering query.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::parser::model::Test;
use crate::query::queryable::Queryable;
use crate::query::state::State;
use crate::query::Query;

impl Query for Test {
    fn process<'a, T: Queryable>(&self, state: State<'a, T>) -> State<'a, T> {
        match self {
            Test::RelQuery(segments) => segments.process(state),
            Test::AbsQuery(jquery) => jquery.process(state.shift_to_root()),
            Test::Function(tf) => tf.process(state),
        }
    }
}