Message156176
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) |
|
Date |
User |
Action |
Args |
2012-03-17 16:37:47 | valhallasw | set | recipients:
+ valhallasw, bob.ippolito, exarkun, eric.araujo, srid, python-dev, kirubakaran |
2012-03-17 16:37:47 | valhallasw | set | messageid: <1332002267.03.0.121209230963.issue6566@psf.upfronthosting.co.za> |
2012-03-17 16:37:46 | valhallasw | link | issue6566 messages |
2012-03-17 16:37:46 | valhallasw | create | |
|