]> granicus.if.org Git - python/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 3b832f684c6a435ebf8c48dc83bc2837d9ee7fee..5d97ee88fc49ceb0deee9717f8210f0c140d0dcc 100644 (file)
@@ -329,6 +329,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)