[issue10976] json.loads() throws TypeError on bytes object

Balthazar Rouberol report at bugs.python.org
Thu Apr 26 10:20:57 CEST 2012


Balthazar Rouberol <rouberol.b at gmail.com> added the comment:

I know this does not fix anything at the core, but it would allow you to use json.loads() with python 3.2 (maybe 3.1?):

Replace 
json.loads(raw_data)

by

raw_data = raw_data.decode('utf-8') # Or any other ISO format
json.loads(raw_data)

----------
nosy: +Balthazar.Rouberol

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10976>
_______________________________________


More information about the Python-bugs-list mailing list