Commits

Barry Warsaw committed 04738f3

Let's sort the keys so that this test passes even with random hashes.

Comments (0)

Files changed (1)

Lib/json/__init__.py

 Compact encoding::
 
     >>> import json
-    >>> json.dumps([1,2,3,{'4': 5, '6': 7}], separators=(',',':'))
+    >>> json.dumps([1,2,3,{'4': 5, '6': 7}], sort_keys=True, separators=(',',':'))
     '[1,2,3,{"4":5,"6":7}]'
 
 Pretty printing (using repr() because of extraneous whitespace in the output)::