Merlijn van Deen <valhall...@gmail.com> added the comment:

JSON does not have the distinction between bytes and unicode; py2 strings are 
coerced into unicode.

I think it would be better to speak about 'JSON string' or 'JSON string 
element' if it's JSON and about 'unicode' (2.7) or 'str' (3.x) when speaking 
about the data that has been decoded again.

>>> json.loads(json.dumps("boo"))
u'boo'
>>> json.loads(json.dumps({"a": "b"}))
{u'a': u'b'}

(the keys will always be unicode in 2.7)

----------
nosy: +valhallasw

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue6566>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to