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:
Felix Crux 2013-08-12 17:39:51 -04:00
parent bbf4a46304
commit 60fb9719a1

View file

@ -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)