# HG changeset patch # User Felix Crux # Date 1376343591 14400 # Mon Aug 12 17:39:51 2013 -0400 # Node ID c5dd6999bf869745d9fc39a60dcc225e1b332870 # Parent b788d04f14d6cfb092b1e3ad6b81165d36408058 Documenting that json.load may raise a ValueError. Issue #18680: JSONDecoder should document that it raises a ValueError for malformed data diff -r b788d04f14d6 -r c5dd6999bf86 Doc/library/json.rst --- a/Doc/library/json.rst Mon Aug 12 20:48:15 2013 +0200 +++ b/Doc/library/json.rst Mon Aug 12 17:39:51 2013 -0400 @@ -245,6 +245,8 @@ 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) # HG changeset patch # User Felix Crux # Date 1376343591 14400 # Mon Aug 12 17:39:51 2013 -0400 # Branch 3.3 # Node ID e6641f6370d6e824c56cad1ebe8488363856eb9c # Parent a89226508a040b37757b1e3ead088a8eef67d551 Documenting that json.load may raise a ValueError. Issue #18680: JSONDecoder should document that it raises a ValueError for malformed data diff -r a89226508a04 -r e6641f6370d6 Doc/library/json.rst --- a/Doc/library/json.rst Mon Aug 12 13:49:30 2013 -0400 +++ b/Doc/library/json.rst Mon Aug 12 17:39:51 2013 -0400 @@ -248,6 +248,8 @@ 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) # HG changeset patch # User Felix Crux # Date 1376343591 14400 # Mon Aug 12 17:39:51 2013 -0400 # Branch 2.7 # Node ID 4f1f697651c7ff544f142d13e756435f1e3d2fdf # Parent adbc9789a5e475094bee3dd7d74d5537f0746304 Documenting that json.load may raise a ValueError. Issue #18680: JSONDecoder should document that it raises a ValueError for malformed data diff -r adbc9789a5e4 -r 4f1f697651c7 Doc/library/json.rst --- a/Doc/library/json.rst Mon Aug 12 15:50:10 2013 -0400 +++ b/Doc/library/json.rst Mon Aug 12 17:39:51 2013 -0400 @@ -256,6 +256,8 @@ 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[, cls[, object_hook[, parse_float[, parse_int[, parse_constant[, object_pairs_hook[, **kw]]]]]]]])