summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorFelix Crux <felixc@felixcrux.com>2013-08-12 21:39:51 (GMT)
committerFelix Crux <felixc@felixcrux.com>2013-08-12 21:39:51 (GMT)
commit60fb9719a195d55264b3129203790a6b43988442 (patch)
tree1fb0d1ac9ca1091f321f2991e89a9271a6d7034b /Doc
parentbbf4a4630449f49a24a43ec642aa493ad647ad0d (diff)
downloadcpython-60fb9719a195d55264b3129203790a6b43988442.zip
cpython-60fb9719a195d55264b3129203790a6b43988442.tar.gz
cpython-60fb9719a195d55264b3129203790a6b43988442.tar.bz2
Documenting that json.load may raise a ValueError.
Issue #18680: JSONDecoder should document that it raises a ValueError for malformed data
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/json.rst2
1 files changed, 2 insertions, 0 deletions
diff --git a/Doc/library/json.rst b/Doc/library/json.rst
index 68aef21..877ccd0 100644
--- a/Doc/library/json.rst
+++ b/Doc/library/json.rst
@@ -245,6 +245,8 @@ Basic Usage
kwarg; otherwise :class:`JSONDecoder` is used. Additional keyword arguments
will be passed to the constructor of the class.
+ If the data being deserialized is not a valid JSON document, a
+ :exc:`ValueError` will be raised.
.. function:: loads(s, encoding=None, cls=None, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, object_pairs_hook=None, **kw)