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
use ksql::parser::{Parser, Value};

fn main() -> anyhow::Result<()> {
    let src = r#"{"name":"MyCompany", "properties":{"employees": 50}"#.as_bytes();
    let ex = Parser::parse(".properties.employees > 20")?;
    let result = ex.calculate(src)?;
    println!("{result}");
    assert_eq!(Value::Bool(true), result);

    Ok(())
}