From f2cce84513728bb73ff4537b4570de1a0af142dd Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Wed, 8 Jan 2025 09:36:44 +0100 Subject: [PATCH] gh-87506: Amend json.loads() post PR GH-127355 (GH-128609) (cherry picked from commit cdfb8bc93a4d8c06d2404ba2d243937ba209438c) Co-authored-by: Erlend E. Aasland --- Doc/library/json.rst | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Doc/library/json.rst b/Doc/library/json.rst index 88730d0cd25b8d..bc26f475edcb66 100644 --- a/Doc/library/json.rst +++ b/Doc/library/json.rst @@ -332,15 +332,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 `. - 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.