From: Felix Crux Date: Mon, 12 Aug 2013 21:39:51 +0000 (-0400) Subject: Documenting that json.load may raise a ValueError. X-Git-Tag: v3.4.0a2~237 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b435799520bcf14432490aeb7526d696986d8285;p=thirdparty%2FPython%2Fcpython.git Documenting that json.load may raise a ValueError. Issue #18680: JSONDecoder should document that it raises a ValueError for malformed data --- diff --git a/Doc/library/json.rst b/Doc/library/json.rst index 877ccd07ee13..3b832f684c6a 100644 --- a/Doc/library/json.rst +++ b/Doc/library/json.rst @@ -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 ---------------------