Skip to content

Preserve non-string member names when matching diff values - #279

Open
boogu2005 wants to merge 1 commit into
stefankoegl:masterfrom
boogu2005:fix/diff-match-non-string-member-names
Open

boogu2005 wants to merge 1 commit into
stefankoegl:masterfrom
boogu2005:fix/diff-match-non-string-member-names

Conversation

@boogu2005

Copy link
Copy Markdown
Contributor

JSON serialization can make different object members look identical. For example, the diff treats [{1: "a"}] and [{"1": "a"}] as equal, and move optimization can carry the wrong key into the patched document.

Include the original non-string member names and their locations in diff comparisons. Array alignment can then report changes that cannot be expressed as JSON Pointer paths, and move optimization only reuses values with matching member names.

@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 100.0%. remained the same — boogu2005:fix/diff-match-non-string-member-names into stefankoegl:master

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants