]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Documenting that json.load may raise a ValueError.
authorFelix Crux <felixc@felixcrux.com>
Mon, 12 Aug 2013 21:39:51 +0000 (17:39 -0400)
committerFelix Crux <felixc@felixcrux.com>
Mon, 12 Aug 2013 21:39:51 +0000 (17:39 -0400)
Issue #18680: JSONDecoder should document that it raises a ValueError
  for malformed data

Doc/library/json.rst

index 877ccd07ee1315baded538c719436fe710419555..3b832f684c6a435ebf8c48dc83bc2837d9ee7fee 100644 (file)
@@ -256,6 +256,8 @@ Basic Usage
    The other arguments have the same meaning as in :func:`load`, except
    *encoding* which is ignored and deprecated.
 
+   If the data being deserialized is not a valid JSON document, a
+   :exc:`ValueError` will be raised.
 
 Encoders and Decoders
 ---------------------