JSONEval-Rs
High-performance JSON Logic evaluation library with 80+ operators
Features
- 🚀 High Performance - Built in Rust for maximum speed
- 📦 80+ Operators - Comprehensive operator support
- 🔌 Multiple Bindings - C#, React Native, WASM, and Web
- 🔒 Type Safety - Strong typing with MessagePack support
- 📚 Well Documented - Extensive documentation and examples
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
- Core Operators - Variables, references, and literals
- Logical Operators - Boolean logic and conditionals
- Comparison Operators - Value comparisons
- Arithmetic Operators - Mathematical operations
- String Operators - Text manipulation
- Math Functions - Advanced math operations
- Date Functions - Date and time operations
- Array Operators - Array transformations
- Table Operators - Data table operations
- Utility Operators - Helper functions
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
License
MIT License