[issue6105] json.dumps doesn't respect OrderedDict's iteration order

Skip Montanaro report at bugs.python.org
Tue May 26 14:38:00 CEST 2009


Skip Montanaro <skip at pobox.com> added the comment:

I can't see that the order of keys should matter for language-neutral
serialization libs like json or xmlrpclib.  You're quite possibly
going to be communicating with something on the other end which doesn't
have an OrderedDict-like class.  Why add the extra complication to the
library?

Even with Python of recent enough vintage at both ends, I can't see
that you could dumps() an OrderedDict then loads() the resulting
string and get an OrderedDict out as a result.  You should get a dict,
right?

----------
nosy: +skip.montanaro

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


More information about the Python-bugs-list mailing list