[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

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,

nosy: +skip.montanaro

Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list