New submission from Barry A. Warsaw <[email protected]>:
json is defined as mapping the JSON string type into unicodes. This works as
advertised in Python 2.6 and 3, but in Python 2.7 it returns a str.
% python2.6 -c "import json; print json.loads('{\"foo\":\"bar\"}')"
{u'foo': u'bar'}
% python2.7 -c "import json; print json.loads('{\"foo\":\"bar\"}')"
{'foo': 'bar'}
Platform tested so far: Ubuntu 10.10 amd64.
----------
messages: 119732
nosy: barry
priority: critical
severity: normal
status: open
title: json.loads() on str erroneously returns str
type: behavior
versions: Python 2.7
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue10216>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com