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: v2.7.6rc1~247 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b4e186cf113f77a51ae3387ceecc17b022a4b499;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 6e1a9c3d2ed7..caee9531dba8 100644 --- a/Doc/library/json.rst +++ b/Doc/library/json.rst @@ -348,6 +348,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)