Open GFoley83 opened 2 years ago
I think your example is merge patch (e.g. JSON Merge Patch) which is currently not supported. The patch document generated through diffing is equivalent to JSON Patch, which contains all operations required to fully transform JSON A to B. If you use the Live Demo provided by jsondiffpatch, you can visualize the document/operations.
I say currently not supported because I did plan to add some support for it at some stage.
It would be awesome to have this feature.
I'm confused about how to preserve missing values from when
diff
ing two objects.Take for example these two json blocks:
When I run a patch, I would like to end up with:
Basically all the missing values are preserved and only the values that conflict are updated, but I can seem to achieve this.