-
Notifications
You must be signed in to change notification settings - Fork 95
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
Fix issue not recognizing that, in JSON, 1 != 1.0 != True #106
Conversation
…nders 2 values. This avoids flagging mismatches between classes which happen to be different but which are JSONified as the same thing.
isinstance(dst, MutableMapping): | ||
self._compare_dicts(_path_join(path, key), src, dst) | ||
|
||
elif isinstance(src, MutableSequence) and \ | ||
isinstance(dst, MutableSequence): | ||
self._compare_lists(_path_join(path, key), src, dst) | ||
|
||
elif json.dumps(src) == json.dumps(dst): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please ask a comment to describe this comparison? It makes sense now in the context of this pull request, but it might be confusing if you look at it a year from now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, plus a note about how performance could later be improved.
Thanks! I have just released v1.25 with this fix. |
Fixes: