我有一个 JSON 数组:
public JSONObject toJSONObject(DataJSONConverter dataJsonConverter) {
JSONObject jsonResponse = new JSONObject();
if (datas != null && dataJsonConverter != null) {
JSONArray jsonDatas = new JSONArray();
// for (Iterator<? extends Object> iter = datas.iterator(); iter.hasNext();) {
// jsonDatas.put(dataJsonConverter.toJSONObject(iter.next()));
// }
for (Object iter : datas) {
jsonDatas.put(dataJsonConverter.toJSONObject(iter));
}
jsonResponse.put("datas", jsonDatas);
jsonResponse.put("count", count);
}
结果为“数据”:
[{"id":60685,"libelle":"BILAN3","typeAnomalie":"Trop de points
invalides","dateDebut":"18\/07\/2013 00:00","numero":"1268"}
{"id":60628,"libelle":"_fictif","typeAnomalie":"Trop de points
invalides","dateDebut":"02\/06\/2013 00:00","numero":"1242"}
{"id":14672,"libelle":"NAVIL 949","typeAnomalie":"D\u00e9passement","dateDebut":"13\/05\/2012 12:00","numero":"263"}]
如何按“dateDebut”进行升序?
谢谢