[issue27765] Accept UTF-8 encoded bytes as input to json.loads()

2016-08-17 Thread Berker Peksag

Changes by Berker Peksag :


--
stage: needs patch -> resolved

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27765] Accept UTF-8 encoded bytes as input to json.loads()

2016-08-17 Thread STINNER Victor

Changes by STINNER Victor :


--
resolution:  -> duplicate
status: open -> closed
superseder:  -> accept bytes in json.loads()

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27765] Accept UTF-8 encoded bytes as input to json.loads()

2016-08-15 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This looks as a duplicate of issue10976.

See also issue17909 (which covers not just UTF-8, but UTF-16 and UTF-32, in 
conforming with RFC 4627).

--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27765] Accept UTF-8 encoded bytes as input to json.loads()

2016-08-15 Thread Nick Coghlan

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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com