-
Notifications
You must be signed in to change notification settings - Fork 30
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
TypeError: 'int' object is not iterable #32
Comments
Thanks for the bug report. Interesting; integer keys aren't actually legal in JSON5 (or JSON), but this is about what's supported in the host language, not JSON5. If you are okay with the integers being converted to strings (as the json module does), it seems fine to implement this. |
Should be fine to do the same as the json module. But there is a possibility to introduce duplicate keys:
Maybe it could be worth to have a warning in such a case? Same story goes for floats. |
Good point. The Python JSON module documentation explicitly notes that "loads(dumps(x)) != x if x has non-string keys." I can at least add the same note to my documentation, but I probably wouldn't have a warning if the json module doesn't. |
I've got a fix for this now, I'm trying to wrap up fixes for the other open bugs and get a release out, probably tomorrow or the next day. |
Great 👍 |
Okay, this should be fixed now in v0.9.0, which is live on PyPI. |
Confirmed, thanks. |
pyjson5 0.8.5 on python 3.6.3
The text was updated successfully, but these errors were encountered: