testing::json

Function diff_json_value

source
pub fn diff_json_value(
    a: &mut Value,
    b: &mut Value,
    normalize: &mut dyn FnMut(&str, &mut Value),
) -> bool
Expand description

Remove common properties, recursively. You can optionally normalize more by passing a closure.

Closure takes (key, value).

Returns true if actual and expected are equal.