-
-
-
-
-
- public static Map<String, String> getMapStr(String json){
- Map<String, String> mapStr = new HashMap<String, String>();
- try {
- mapStr = JSON.parseObject(json, new TypeReference<Map<String, String>>(){});
- } catch (Exception e) {
- e.printStackTrace();
- }
- return mapStr;
- }
-
-
-
-
-
-
- public static Map<String, Object> getMapObj(String json){
- Map<String, Object> mapStr = new HashMap<String, Object>();
- try {
- mapStr = JSON.parseObject(json, new TypeReference<Map<String, Object>>(){});
- } catch (Exception e) {
- e.printStackTrace();
- }
- return mapStr;
- }
-
-
-
-
-
-
- public static List<Map<String, Object>> getListMap(String json){
- List<Map<String, Object>> list = new ArrayList<Map<String,Object>>();
- try {
- list = JSON.parseObject(json,new TypeReference<List<Map<String, Object>>>(){});
- } catch (Exception e) {
- e.printStackTrace();
- }
- return list;
- }
- }
阅读全文……