Skip to content

Commit 4b382f6

Browse files
srinivasreddyerlend-aasland
authored andcommitted
gh-87506: Document that json.load*() can raise UnicodeDecodeError (GH-127355)
(cherry picked from commit 15372d0) Co-authored-by: Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్ రెడ్డి) <[email protected]> Co-authored-by: Erlend Aasland <[email protected]>
1 parent b46adda commit 4b382f6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Doc/library/json.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,10 @@ Basic Usage
313313
:raises JSONDecodeError:
314314
When the data being deserialized is not a valid JSON document.
315315

316+
:raises UnicodeDecodeError:
317+
When the data being deserialized does not contain
318+
UTF-8, UTF-16 or UTF-32 encoded data.
319+
316320
.. versionchanged:: 3.1
317321

318322
* Added the optional *object_pairs_hook* parameter.

0 commit comments

Comments
 (0)