Function compare_serde_values

Source
pub fn compare_serde_values(
    a: &Value,
    b: &Value,
    sort_arrays: bool,
    ignore_keys: &[Regex],
) -> Result<Mismatch>
Expand description

Compares two serde_json::Value items with each other, returns an error or a Mismatch structure holding all differences. Arguments are the values, a bool to trigger deep sorting of arrays and ignored_keys as a list of regex to match keys against. Ignoring a regex from comparison will also ignore the key from having an impact on sorting arrays.