mirror of
https://github.com/python/cpython.git
synced 2025-07-29 14:15:07 +00:00
Documenting that json.load may raise a ValueError.
Issue #18680: JSONDecoder should document that it raises a ValueError for malformed data
This commit is contained in:
parent
569a5faaea
commit
bc4b8ebc8b
1 changed files with 2 additions and 0 deletions
|
@ -328,6 +328,8 @@ Encoders and Decoders
|
|||
those with character codes in the 0-31 range, including ``'\t'`` (tab),
|
||||
``'\n'``, ``'\r'`` and ``'\0'``.
|
||||
|
||||
If the data being deserialized is not a valid JSON document, a
|
||||
:exc:`ValueError` will be raised.
|
||||
|
||||
.. method:: decode(s)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue