[New-bugs-announce] [issue23473] Allow namedtuple to be JSON encoded as dict

Zack report at bugs.python.org
Tue Feb 17 17:52:36 CET 2015


New submission from Zack:

We used to be able to override _iterencode prior to 2.7 to get our namedtuples to be encoded as dict using json.dump(s) but now we can not.

Namedtuples are automatically encoded as list but it would be more logical and convenient to have them encoded as dict

----------
messages: 236139
nosy: Zack--, ezio.melotti, pitrou, rhettinger
priority: normal
severity: normal
status: open
title: Allow namedtuple to be JSON encoded as dict
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23473>
_______________________________________


More information about the New-bugs-announce mailing list