douglascrockford/JSON-java — pull request #80 by gmokki (2013-04-01 19:11:06+00:00)
Title: JSONObject render fields in sorted order with -Dorg.json.fields.sort=true

The new Java versions(*) randomize the plain HashMap order making the current JSONObject.toString unusable in unit tests or other situations where the output could needs to be in same order on each run.

*) Java8 or Java7 with CVE fix enabling system property (http://docs.oracle.com/javase/7/docs/technotes/guides/collections/changes7.html)