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

Not a drop-in replacement #252

coryvirok opened this issue Feb 16, 2017 · 3 comments


None yet
3 participants
Copy link

commented Feb 16, 2017

I tried using this as a drop-in replacement for the standard json library only to find that ujson doesn't support longs.

>>> import ujson
>>> import json
>>> json.loads("272757895493505930073807329622695606794392")
>>> ujson.loads("272757895493505930073807329622695606794392")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: Value is too big!

Are there any plans on supporting longs? If not, can you please update your README?


This comment has been minimized.

Copy link

commented Feb 16, 2017

It's a drop-in replacement in the same liberal sense that that is a long :)

But yeah, you're right that the readme should point out where it doesn't align with the standard json module.


This comment has been minimized.

Copy link

commented Feb 17, 2017

Hah, touché!


This comment has been minimized.

Copy link

commented Feb 23, 2017

Ujson escapes slashes, while json and simplejson doesn't.

>>> url = {"url":""}
>>> json.dumps(url)
'{"url": ""}'
>>> simplejson.dumps(url)
'{"url": ""}'
>>> ujson.dumps(url)

Please mention differences like this in the ReadMe. It may save some time for dev's in debugging new errors after changing to ujson.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.