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
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -364,6 +364,10 @@ Basic Usage
364
364
.. versionchanged:: 3.9
365
365
The keyword argument *encoding* has been removed.
366
366
367
+
.. note::
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'}``
0 commit comments