-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Diff generates invalid patch if an object becomes an array #37
Comments
Ah, that's annoying. Seems like library I use, I'll try to rewrite the whole diffing myself. Doing it directly against |
Re-implementing the diffing algorithm to fix an issue when "kind" of the node changes (array into an object or vice-versa), #37.
Re-implementing the diffing algorithm to fix an issue when "kind" of the node changes (array into an object or vice-versa), #37.
Re-implementing the diffing algorithm to fix an issue when "kind" of the node changes (array into an object or vice-versa), #37.
Re-implementing the diffing algorithm to fix an issue when "kind" of the node changes (array into an object or vice-versa), #37. Fix some invalid tests, add more tests.
Re-implementing the diffing algorithm to fix an issue when "kind" of the node changes (array into an object or vice-versa), #37. Fix some invalid tests, add more tests.
Should be fixed in 1.3.0. |
that was fast, I'll try it out! thanks 😄 |
There seems to be an issue with the json_patch::diff function. The path op Add is returned before Remove. Added failing test case as an example:
gives output
If I try this same with some other diff tool eg (https://json-patch-builder-online.github.io/) it gives the patches in right order eg.:
while this lib gives the Add op first.
The text was updated successfully, but these errors were encountered: