Skip to content

Commit 541878a

Browse files
committed
gh-137533:add RFC link ,then fix a RFC link at line 376
1 parent 40c5678 commit 541878a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Doc/library/json.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ is a lightweight data interchange format inspired by
2222
The term "object" in the context of JSON processing in Python can be
2323
ambiguous. All values in Python are objects. In JSON, an object refers to
2424
any data wrapped in curly braces, similar to a Python dictionary.
25+
2526
.. warning::
2627
Be cautious when parsing JSON data from untrusted sources. A malicious
2728
JSON string may cause the decoder to consume considerable CPU and memory
@@ -146,7 +147,7 @@ See :ref:`json-commandline` for detailed documentation.
146147
default. Order is only lost if the underlying containers are unordered.
147148

148149
.. note::
149-
According to RFC 7159, the keys of all objects in JSON are strings.
150+
According to :rfc:`7159`, the keys of all objects in JSON are strings.
150151
Under normal circumstances,the encoder of this module
151152
will convert the keys of all Python dictionaries into strings as the
152153
keys of JSON objects, and the decoder of this module will
@@ -372,7 +373,7 @@ Basic Usage
372373

373374
.. note::
374375

375-
As mandated by :rfc:`8259`, JSON keys must be :class:`str` objects.
376+
As mandated by :rfc:`7159`, JSON keys must be :class:`str` objects.
376377
In particular, ``json.loads('{"42": "spam"}')`` returns ``{'42': 'spam'}``,
377378
but ``json.loads('{42: "spam"}')`` fails since ``42`` is not a valid JSON key.
378379

0 commit comments

Comments
 (0)