Commits

Barry Warsaw committed 04738f3

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

  • Participants
  • Parent commits 19e6e55
  • Branches 2.6

Comments (0)

Files changed (1)

File 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)::