Skip to main content

compute_diff

Function compute_diff 

Source
pub fn compute_diff(
    old: Option<&Value>,
    new: &Value,
    forced: &HashSet<String>,
    current_path: &str,
) -> Option<Value>
Expand description

Recursively computes a JSON diff between two values (internal).

Returns a partial JSON value containing only changed fields (new values) and optionally forced fields (even if unchanged).

If no differences (and no forced fields apply), returns Value::Null or an empty object.