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

Antoine Pitrou report at bugs.python.org
Tue Oct 11 15:51:37 CEST 2011

Antoine Pitrou <pitrou at free.fr> added the comment:

> I'll just mention that the elimination of bytes handling is a bit
> unfortunate, since this idiom which works in Python 2 no longer works:
> fp = urlopen(url)
> json_data = json.load(fp)

What if the returned JSON uses a charset other than utf-8 ?


Python tracker <report at bugs.python.org>

More information about the docs mailing list