Skip to the content.

JSONEval-Rs

High-performance JSON Logic evaluation library with 80+ operators

CI Build Bindings GitHub Release

Crates.io NuGet RN Web Core Bundler Node

Features

Quick Start

use json_eval_rs::eval;

let logic = json!({
    "if": [
        {">": [{"var": "user.age"}, 18]},
        "adult",
        "minor"
    ]
});

let data = json!({
    "user": {
        "name": "John",
        "age": 25
    }
});

let result = eval(&logic, &data)?;
// Returns: "adult"

Documentation

Operator Categories

Quick Reference

See the Operators Summary for a complete alphabetical list of all available operators.

Installation

Rust

[dependencies]
json-eval-rs = "0.1"

C# / .NET

dotnet add package JsonEvalRs

Web / WASM

npm install @json-eval-rs/bundler

React Native

npm install @json-eval-rs/react-native

Repository

View on GitHub

License

MIT License