gh-87506: Document that json.load*() can raise UnicodeDecodeError (#127355)

Co-authored-by: Erlend Aasland <erlend@python.org>
This commit is contained in:
Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్ రెడ్డి) 2025-01-08 13:05:43 +05:30 committed by GitHub
parent 65ae3d5a73
commit 15372d0112
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -324,6 +324,10 @@ Basic Usage
:raises JSONDecodeError:
When the data being deserialized is not a valid JSON document.
:raises UnicodeDecodeError:
When the data being deserialized does not contain
UTF-8, UTF-16 or UTF-32 encoded data.
.. versionchanged:: 3.1
* Added the optional *object_pairs_hook* parameter.