Closed WojciechNagorski closed 1 year ago
Looks like a bug to me in diff.
I can reproduce this using:
var left = JsonNode.Parse("{\"foo\":1}");
var right = JsonNode.Parse("{\"foo\":null}");
var diff = left.Diff(right);
JsonDiffPatcher.Patch(ref left, diff);
The diff generated is:
{"foo":[1,""]}
but it should be:
{"foo":[1,null]}
Should be fixed in 1.3.1-preview.2 now. I will leave this issue open until I can merge the PR.
I've tested 1.3.1-preview.2 and everything looks great.
The diff of nullable properties works and I've checked the property filter and it works excellently.
I have type:
I've generated diff for the change:
But then I'm not able to Patch object. I've got the exception: