Commit bc4b8ebc authored by Felix Crux's avatar Felix Crux

Documenting that json.load may raise a ValueError.

Issue #18680: JSONDecoder should document that it raises a ValueError
  for malformed data
parent 569a5faa
...@@ -328,6 +328,8 @@ Encoders and Decoders ...@@ -328,6 +328,8 @@ Encoders and Decoders
those with character codes in the 0-31 range, including ``'\t'`` (tab), those with character codes in the 0-31 range, including ``'\t'`` (tab),
``'\n'``, ``'\r'`` and ``'\0'``. ``'\n'``, ``'\r'`` and ``'\0'``.
If the data being deserialized is not a valid JSON document, a
:exc:`ValueError` will be raised.
.. method:: decode(s) .. method:: decode(s)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment