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 433f948ed8cd7ffe07e95e05e78d543516bc2d2a..f6520393eb5e0740657e2f868540b9568f41058f 100644 (file)
@@ -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)