New submission from Nick Coghlan:

In two recent Python 3 porting projects, a key incompatibility I encountered 
was that "json.loads(data)" on UTF-8 encoded bytes required an explicit 
decoding step under Python 3, rather than implicitly decoding the data as UTF-8.

Unlike many other wire formats, assuming UTF-8 for binary JSON data is a pretty 
safe assumption, and there's no type ambiguity here since the output type is 
still a properly decoded JSON object.

(This RFE has been split out from the larger RFE at #19837, which also covers 
implicit *encoding* to UTF-8, which is a more questionable idea)

----------
components: Library (Lib)
messages: 272725
nosy: ezio.melotti, ncoghlan, rhettinger
priority: normal
severity: normal
stage: needs patch
status: open
title: Accept UTF-8 encoded bytes as input to json.loads()
type: enhancement
versions: Python 3.6

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

Reply via email to