This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mattheww
Recipients mattheww
Date 2021-02-27.18:24:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1614450261.52.0.147425024304.issue43340@roundup.psfhosted.org>
In-reply-to
Content
The documentation for json.load() and json.loads() says:

« If the data being deserialized is not a valid JSON document, a JSONDecodeError will be raised. »

But this is not currently entirely true: if the data is provided in bytes form and is not properly encoded in one of the three accepted encodings, UnicodeDecodeError is raised instead.

(I have no opinion on whether the documentation or the behaviour should be changed.)
History
Date User Action Args
2021-02-27 18:24:21matthewwsetrecipients: + mattheww
2021-02-27 18:24:21matthewwsetmessageid: <1614450261.52.0.147425024304.issue43340@roundup.psfhosted.org>
2021-02-27 18:24:20matthewwlinkissue43340 messages
2021-02-27 18:24:20matthewwcreate