try {
jObject = new JSONObject("{\"foo\": \"bar\", \"number\": 1, \"bool\":null}");
} catch (Exception ex) {
assertTrue(false);
}
Iterator keys = jObject.sortedKeys();
String[] sKeys = new String[] {"bool", "foo", "number"};
int i = 0;
while (keys.hasNext()) {
String key = (String)keys.next();
String sKey = sKeys[i];