Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
gh-141510: Document frozendict support in json (gh-155929)
(cherry picked from commit c3df37c)

Co-authored-by: Sanghun Lee <oper6909@gmail.com>
  • Loading branch information
fregataa authored and miss-islington committed Aug 17, 2026
commit e675e69fc202345a2e06ddcbfde42967836fdbfc
5 changes: 4 additions & 1 deletion Doc/library/json.rst
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ Encoders and Decoders
+----------------------------------------+---------------+
| Python | JSON |
+========================================+===============+
| dict | object |
| dict, frozendict | object |
+----------------------------------------+---------------+
| list, tuple | array |
+----------------------------------------+---------------+
Expand All @@ -504,6 +504,9 @@ Encoders and Decoders
.. versionchanged:: 3.4
Added support for int- and float-derived Enum classes.

.. versionchanged:: 3.15
Added support for :class:`frozendict`.

To extend this to recognize other objects, subclass and implement a
:meth:`~JSONEncoder.default` method with another method that returns a serializable object
for ``o`` if possible, otherwise it should call the superclass implementation
Expand Down
Loading