Skip to content

Commit

Permalink
pythongh-87506: Amend json.loads() post PR pythonGH-127355 (pythonGH-…
Browse files Browse the repository at this point in the history
…128609)

(cherry picked from commit cdfb8bc)

Co-authored-by: Erlend E. Aasland <[email protected]>
  • Loading branch information
erlend-aasland authored and miss-islington committed Jan 8, 2025
1 parent b46adda commit f2cce84
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions Doc/library/json.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <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.
Expand Down

0 comments on commit f2cce84

Please sign in to comment.