mirror of
https://github.com/python/cpython.git
synced 2025-11-02 19:12:55 +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
bbf4a46304
commit
60fb9719a1
1 changed files with 2 additions and 0 deletions
|
|
@ -245,6 +245,8 @@ Basic Usage
|
|||
kwarg; otherwise :class:`JSONDecoder` is used. Additional keyword arguments
|
||||
will be passed to the constructor of the class.
|
||||
|
||||
If the data being deserialized is not a valid JSON document, a
|
||||
:exc:`ValueError` will be raised.
|
||||
|
||||
.. function:: loads(s, encoding=None, cls=None, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, object_pairs_hook=None, **kw)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue