json-diff
json-diff copied to clipboard
The returned result is not as expected
Code to reproduce the problem: diff-err.zip
Run npm run start
to get the following output:
Output:
unexpect-> [ [ "~", { "holes": [ [ " " ], [ "-", { "depth": 11.5, "diameter": 8, "start": { "x": 218, "y": 241, "z": 9 }, "end": { "x": 220, "y": 241, "z": -2.5 }, "plankFaceId": "0", "name": "短木销_修改", "type": "PLANK" } ], [ "+", { "depth": 11.5, "diameter": 8, "start": { "x": 218, "y": 241, "z": 9 }, "end": { "x": 218, "y": 241, "z": -2.5 }, "plankFaceId": "0", "name": "短木销", "type": "PLANK" } ] ] } ] ] expect-> [ [ "~", { "holes": [ [ " " ], [ "~", { "end": { "x": { "__old": 220, "__new": 218 } }, "name": { "__old": "短木销_修改", "__new": "短木销" } } ] ] } ] ]
Is this a mistake? Or am I using it in the wrong way?
@DIHE-GitHub -- it's a bug, thanks for reporting it. I'm looking into it.