ksql 2.0.0

A JSON data expression lexer, parser, cli and library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use crate::parser::{Expression, Result, Value};

#[derive(Debug)]
pub(in crate::parser) struct SelectorPath {
    pub ident: String,
}

impl Expression for SelectorPath {
    fn calculate(&self, json: &[u8]) -> Result<Value> {
        Ok(unsafe { gjson::get_bytes(json, &self.ident).into() })
    }
}