]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-87506: Document that json.load*() can raise UnicodeDecodeError (#127355)
authorSrinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్ రెడ్డి) <thatiparthysreenivas@gmail.com>
Wed, 8 Jan 2025 07:35:43 +0000 (13:05 +0530)
committerGitHub <noreply@github.com>
Wed, 8 Jan 2025 07:35:43 +0000 (07:35 +0000)
Co-authored-by: Erlend Aasland <erlend@python.org>
Doc/library/json.rst

index cf516cf3dc1d2937465837ec7d48a749783b410f..41a09b40d7e88b9dca00fdc0d51ffad22f3f5aed 100644 (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.