From 654f003a13c1340f5297eb5edc82720b9fe524aa Mon Sep 17 00:00:00 2001 From: Felix Crux Date: Mon, 12 Aug 2013 17:39:51 -0400 Subject: Documenting that json.load may raise a ValueError. Issue #18680: JSONDecoder should document that it raises a ValueError for malformed data --- Doc/library/json.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Doc/library/json.rst b/Doc/library/json.rst index 3b832f6..5d97ee8 100644 --- a/Doc/library/json.rst +++ b/Doc/library/json.rst @@ -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) -- cgit v0.12