pub fn normalize(base: &Value, candidate: &Value) -> ValueExpand description
Normalize a candidate document against a base document.
For every leaf path in base:
- If the path is missing in
candidate, copy the base value. - If the path exists as
null, leavenull(explicit deletion). - If the path exists with a value, leave unchanged.
Paths in candidate that do not exist in base are preserved
(they represent additions).
ยงReturns
A new Value representing the normalized candidate.