redact-engine 0.1.2

Protect confidentiality with dynamic redaction by replacing sensitive data from string or JSON format
Documentation
use redact_engine::Redaction;
#[cfg(feature = "redact-json")]
use serde_json::json;

fn main() {
    let redaction = Redaction::new().add_keys(vec!["bar", "array"]);

    let json = json!({
        "key": "value",
        "array": ["val-1", "val-2"],
        "foo": {
            "bar": true,
            "baz": "bar"
        },
        "a": {
            "b": {
                "c": "value"
            }
        }
    })
    .to_string();

    println!("{:#?}", redaction.redact_json(&json));
}