]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-87506: Amend json.loads() post PR #127355 (#128609)
authorErlend E. Aasland <erlend@python.org>
Wed, 8 Jan 2025 08:36:44 +0000 (09:36 +0100)
committerGitHub <noreply@github.com>
Wed, 8 Jan 2025 08:36:44 +0000 (09:36 +0100)
Doc/library/json.rst

index 41a09b40d7e88b9dca00fdc0d51ffad22f3f5aed..4e7046d6d8f6ac43b4b4c71fdc2923668d53f058 100644 (file)
@@ -347,15 +347,11 @@ Basic Usage
 
 .. function:: loads(s, *, cls=None, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, object_pairs_hook=None, **kw)
 
-   Deserialize *s* (a :class:`str`, :class:`bytes` or :class:`bytearray`
+   Identical to :func:`load`, but instead of a file-like object,
+   deserialize *s* (a :class:`str`, :class:`bytes` or :class:`bytearray`
    instance containing a JSON document) to a Python object using this
    :ref:`conversion table <json-to-py-table>`.
 
-   The other arguments have the same meaning as in :func:`load`.
-
-   If the data being deserialized is not a valid JSON document, a
-   :exc:`JSONDecodeError` will be raised.
-
    .. versionchanged:: 3.6
       *s* can now be of type :class:`bytes` or :class:`bytearray`. The
       input encoding should be UTF-8, UTF-16 or UTF-32.