Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Integer keys in dicts #10

Closed
indigoviolet opened this Issue Mar 22, 2010 · 1 comment

Comments

Projects
None yet
2 participants

In this case, I prefer what yajl does [failing to deserialize the data instead of what json does: convert the integer keys to strings]. It might be nicer to either (a) support integer keys or (b) fail on dumps(), instead of loads().

yajl.dumps({1:2})
'{1:2}'

yajl.loads(yajl.dumps({1:2}))

Traceback (most recent call last):
File "", line 1, in
ValueError: parse error

json.loads(json.dumps({1:2}))
{u'1': 2}

Owner

rtyler commented Mar 22, 2010

Resolved in SHA: f40427c

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment