You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Doc/library/json.rst
+6-2Lines changed: 6 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -366,8 +366,12 @@ Basic Usage
366
366
367
367
.. note::
368
368
369
-
As mandated by RFC 8259,the key in key-value pairs in JSON is always of type of :class:`str`,so the key of the dictionary that is got by serializing a JSON object is always a string.
370
-
Example:``json.loads('{"42":"value"}')`` will get a dictionary ``{'42':'value'}``
369
+
As mandated by RFC 8259, keys in JSON key-value pairs are always of
370
+
type :class:`str`. Therefore, dictionary keys obtained by
371
+
deserializing JSON objects will always be strings.
372
+
For Example,
373
+
``json.loads('{"42":"value"}')`` returns the dictionary
0 commit comments