ksql   ![Latest Version]

Is a JSON data expression lexer, parser, cli and library.

How to install CLI

shell ~ cargo install ksql

Expressions

Expressions support most mathematical and string expressions see here for details of the lexer support and rules.

Usage

```rust use ksql::parser::{Parser, Value}; use std::error::Error;

fn main() -> Result<(), Box>{ let src = r#"{"name":"MyCompany", "properties":{"employees": 50}"#; let expression = ".properties.employees > 20"; let ex = Parser::parse(expression.asbytes())?; let result = ex.calculate(src)?; asserteq!(Value::Bool(true), result); Ok(()) } ```

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.


Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Proteus by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.