Closed cunneen closed 10 months ago
Thanks for the report!
Looks like the re-ordering changes are considered "too significant" to match corresponding key/value pairs correctly.
I'll try to reproduce this with a smaller example and get back to with more detail soon.
Thanks! For the record, we often need to compare json files that have been parsed by a tool and later reserialised, and it would be super useful if we were able to do a semantic comparison within vscode with such property reordering not highlighted at all. Currently we are copying and pasting into jsondiff.com to achieve this.
@cunneen We just released a new version of SemanticDiff that handles JSON much better. Can you give it a try and check if it solves your problem? You might want to check that you actually have version 0.8.7 installed (open the extension tab and hover over SemanticDiff) since we pushed the update literally a few minutes ago.
Closing this bug since it has been fixed for a while. @cunneen please reopen if you run into any issues.
Describe the Bug A clear and concise description of what the bug is.
When JSON files have the sequence of their properties changed without any semantic changes, semanticdiff is highlighting them as changes. The JSON standard specifies that object properties are unordered; some of the tools we use
To Reproduce Open the diff for JSON file with only the property order changed.
Expected Behavior non-semantic changes are not highlighted
Actual Behavior See screenshot
Screenshots
Source Code n/a
SemanticDiff Version v0.8.2
VS Code Information Simply click
Help -> About -> Copy
in VS Code and paste the information:Additional Context n/a