Greeting,
Is it possible to create JSON objects (JSONObject, JSONArray) where the
order of items in the list is preserved by the order they are entered?

Why does JSONOArray return a pair of key and name entries in a different
order then it was originally created?

For Example:
JSONObject response = new JSONObject();
response.put("success", true);
response.put("total", 50);
response.put("metaData", new JSONArray()...);
response.put("records", new JSONArray()...);
response.put("columns", new JSONArray()...);

The above returns a JSON formatted string:
{"total":50,"columns":[{...}],"records":[{...}],"success":true,"metaData":{...},{...},{...},{...}]}}

The order of the output is unpredictable.  Is there a way to have the
Tapestry JSON objects maintain the order of their lists (via LinkedHashMap
for example?)?

Thanks,
Marcel
-- 
View this message in context: 
http://old.nabble.com/T5-JSON-Preserving-Order-tp26584717p26584717.html
Sent from the Tapestry - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to