GeezerVison is showing github.com — [3.15] gh-141510: Document frozendict support in json (gh-155929) (#1… · python/cpython@0bfe0f1
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: Doc/library/json.rst +4-1Lines changed: 4 additions & 1 deletion - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -486,7 +486,7 @@ Encoders and Decoders |
486 | 486 | +----------------------------------------+---------------+ |
487 | 487 | | Python | JSON | |
488 | 488 | +========================================+===============+ |
489 | | - | dict | object | |
| 489 | + | dict, frozendict | object | |
490 | 490 | +----------------------------------------+---------------+ |
491 | 491 | | list, tuple | array | |
492 | 492 | +----------------------------------------+---------------+ |
@@ -504,6 +504,9 @@ Encoders and Decoders |
504 | 504 | .. versionchanged:: 3.4 |
505 | 505 | Added support for int- and float-derived Enum classes. |
506 | 506 |
|
| 507 | + .. versionchanged:: 3.15 |
| 508 | + Added support for :class:`frozendict`. |
| 509 | + |
507 | 510 | To extend this to recognize other objects, subclass and implement a |
508 | 511 | :meth:`~JSONEncoder.default` method with another method that returns a serializable object |
509 | 512 | for ``o`` if possible, otherwise it should call the superclass implementation |
|