From: Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్ రెడ్డి) Date: Wed, 8 Jan 2025 07:35:43 +0000 (+0530) Subject: gh-87506: Document that json.load*() can raise UnicodeDecodeError (#127355) X-Git-Tag: v3.14.0a4~76 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=15372d0112ac7fbbbe313725dd87d5a45af2f6d3;p=thirdparty%2FPython%2Fcpython.git gh-87506: Document that json.load*() can raise UnicodeDecodeError (#127355) Co-authored-by: Erlend Aasland --- diff --git a/Doc/library/json.rst b/Doc/library/json.rst index cf516cf3dc1d..41a09b40d7e8 100644 --- a/Doc/library/json.rst +++ b/Doc/library/json.rst @@ -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.