[issue34858] MappingProxy objects should JSON serialize just like a dictionary

Raymond Hettinger report at bugs.python.org
Sat Jun 6 12:09:03 EDT 2020


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

+1 for reconsidering whether the json module should support mappings that don't inherit for dict.  The decision not to support general mappings is ancient and predates a lot of modern tooling.

The only worry is that the objects won't round-trip — you could store a ChainMap but you wouldn't get a ChainMap back :-(

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34858>
_______________________________________


More information about the Python-bugs-list mailing list