jsonlogic 0.1.2

A JsonLogic implementation in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
use serde_json::{json, Value};

use super::logic;

pub fn compute(args: &[Value]) -> Value {
    let a = args.get(0).unwrap_or(&json!(null));
    let b = args.get(1).unwrap_or(&json!(null));

    Value::Bool(!logic::is_strict_equal(a, b))
}