Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:
Dictionary preserve the insertion order starting from Python 3.7 (actually from 3.6, but it was not guarantied). I am surprised that you got different result in 3.6. I cannot reproduce it. In older Python versions you can pass object_pairs_hook=OrderedDict to json.loads() to preserve the insertion order. The regular dictionary cannot preserve it, by its structure. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38414> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com