Skip to main content

diff

Function diff 

Source
pub fn diff<T: Serialize>(old: &Value, new: &T) -> Diff
Expand description

Generate an RFC 7396 merge patch transforming old into new.

Only object roots produce a recursive patch; any other root forces a snapshot. A merge patch that would delete a key it shouldn’t (a value genuinely set to null) also forces a snapshot.