jlens-core
A JSONata engine in Rust, with evaluation audits. It is the language core of jlens.
- Complete JSONata 2.2. Every operator and built-in function. It passes 1,688 of the 1,690 cases of the official test suite; the other two are documented.
- Explainable.
evaluate_auditedrecords which comparisons passed or failed, which items filters rejected and which values were bound. Labels in ordinary comments (/** @label "Minimum total" */) name the checks. - Tooling-ready. Recovering parsing, a public syntax tree with spans, a function catalog, and stable error codes.
- Safe to embed. Timeouts and depth limits. Deep recursion fails with an error instead of
overflowing the stack. Compiled expressions are
Send + Sync.
use ;
use json;
let expr = compile?;
let order = json!;
let total = expr.evaluate?;
assert_eq!;
Documentation
- The API reference.
- The jlens book: a language reference, and guides to the crate, auditing and performance
(
docs/in the repository). jlens-schemaadds schema inference and editor support (completion, diagnostics, hover).jlens-cliis thejlenscommand.
License
MIT. Parts are ported from jsonata-js, also MIT; see
LICENSE.