This crate provides JSON helper functions beyond Serialization & Deserialization such as diff
, merge
, ...
[dependencies]
json_plus = "0.1"
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(())
}
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.