importcom.alibaba.fastjson.JSON;importcom.alibaba.fastjson.JSONArray;importcom.alibaba.fastjson.JSONException;importcom.alibaba.fastjson.JSONObject;importjava.util.ArrayList;importjava.util.Collections;importjava.util.Comparator;importjava.util.List;public classDemo {public static voidmain(String[] args) {
String jsonArrStr= "[{\"ID\":\"A01\",\"Name\":\"张三\",\"Score\":88},{\"ID\":\"A02\",\"Name\":\"李四\",\"Score\":99},{\"ID\":\"A01\",\"Name\":\"王五\",\"Score\":77}]";
System.out.println("排序前:" +jsonArrStr);
String jsonArraySort=jsonArraySort(jsonArrStr);
System.out.println("排序后:" +jsonArraySort);
}public staticString jsonArraySort(String jsonArrStr) {//json字符串转为JSONArray
JSONArray jsonArr =JSON.parseArray(jsonArrStr);/