List<JSONObject> collect = parseObject.collect();
ArrayList<JSONObject> arrayList = new ArrayList<JSONObject>(collect);//没有此转换会java.lang.UnsupportedOperationException 报错
if(collect.size()>0){
Collections.sort(arrayList, new Comparator<JSONObject>() {
public int compare(JSONObject o1, JSONObject o2) {
Date a=o1.getDate("op_ts");
Date b= o2.getDate("op_ts");
if (a.compareTo(b)>0) {
return 1;
} else if(a.compareTo(b)==0) {
return 0;
} else
return -1;
}
});