String转list<Map<String,string>> list
String appNames = "[{\"cpuNumber\":4,\"memorySize\":8,\"serverName\":\"ddd\",\"serversNumber\":1},{\"cpuNumber\":4,\"memorySize\":8,\"serverName\":\"aaa\",\"serversNumber\":1},{\"cpuNumber\":2,\"memorySize\":4,\"serverName\":\"bbb\",\"serversNumber\":1}]"; List<Map<String, String>> list = (List<Map<String, String>>) JSONArray.parse(appNames); System.out.println(list); for(Map<String,String> mapList : list){ System.out.println(mapList); for(Map.Entry entry : mapList.entrySet()){ System.out.println(entry.getKey()); System.out.println(entry.getValue()); if("serverName".equals(entry.getKey())){ System.out.println(entry.getValue()); } } }