Skip to content
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

changes in object not detected #41

Open
rienafairefr opened this issue May 31, 2017 · 0 comments
Open

changes in object not detected #41

rienafairefr opened this issue May 31, 2017 · 0 comments

Comments

@rienafairefr
Copy link

It looks like the diff algorithm here doesn't compare values strictly, A minimal example is:
{"t":"0"} is not different from {"t":false}

I guess in many javascript-y cases it's not a problem to consider "0" the same as false (or many other comparisons, for that matter), but should this online diff do a !== comparison in the json-patch code here ?

Use case: json strings passed between javascript and non-javascript. If you compare json with json-diff.com and see that there are no changes in the json, while there strictly are changes that the non-javascript backend sees and errors on.

justspamjustin pushed a commit that referenced this issue May 29, 2018
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

No branches or pull requests

1 participant