Skip to content

Commit 15372d0

Browse files
gh-87506: Document that json.load*() can raise UnicodeDecodeError (#127355)
Co-authored-by: Erlend Aasland <[email protected]>
1 parent 65ae3d5 commit 15372d0

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
@@ -324,6 +324,10 @@ Basic Usage
324324
:raises JSONDecodeError:
325325
When the data being deserialized is not a valid JSON document.
326326

327+
:raises UnicodeDecodeError:
328+
When the data being deserialized does not contain
329+
UTF-8, UTF-16 or UTF-32 encoded data.
330+
327331
.. versionchanged:: 3.1
328332

329333
* Added the optional *object_pairs_hook* parameter.

0 commit comments

Comments
 (0)