#json-diff #json #diff #merge #helper #serde-json

json_plus

JSON helper functions beyond Serialization & Deserialization

1 unstable release

0.1.0 Nov 14, 2021

#1507 in Encoding

22 downloads per month

MIT/Apache

16KB
334 lines

json_plus   Latest Version

This crate provides JSON helper functions beyond Serialization & Deserialization such as diff, merge, ...


[dependencies]
json_plus = "0.1"

Example

use json_plus::diff;
use serde_json::json;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let old = json!({"key":"old value", "arr":[]});
    let new = json!({"key":"new value", "arr":[]});

    let diffed = diff(&old, &new).unwrap();
    println!("{}", diffed.to_string());
    Ok(())
}

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Proteus by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~0.7–1.4MB
~33K SLoC