Ok, that actually works. Input order is preserver, except all keys that are either 0 or match /[1-9][0-9]*/ are moved to the top, sorted lexicographically among themselves. Just implemented this, and the rust impl now passes the full test set.
I lied, they are sorted by length first, using lexicographic order as a tie-breaker.
JSON.stringify(JSON.parse('{"300": 0, "20": 0, "1": 0, "200": 0, "250": 0, "201": 0, "30": 0}'), null, 2)
"{
\"1\": 0,
\"20\": 0,
\"30\": 0,
\"200\": 0,
\"201\": 0,
\"250\": 0,
\"300\": 0
}"