3 ms·
> It is certainly not something that can be counted on in golang, Ruby, or Python. As of Python 3.6 (in theory not guaranteed until Python 3.7), key order is p
by quietbritishjim 6y ago
> It is certainly not something that can be counted on in golang, Ruby, or Python.
As of Python 3.6 (in theory not guaranteed until Python 3.7), key order is preserved when reading and writing. That's a consequence of the fact Python dictionaries can now remember the order of insertion.
It's true that it doesn't support duplicate keys though (unless you pass in a different class to the object_pairs_hook parameter of loads() to replace its use of dict).