public static void jsonToBean(String data) {
try {
JSONArray array = new JSONArray(data);//å°json
å符串转æjsonæ°ç»
for (int i = 0; i < array.length(); i++) {//循ç¯jsonæ°ç»
JSONObject ob = (JSONObject) array.get(i);//å¾å°json对象
String name= ob.getString("name");//nameè¿éæ¯åå称ï¼è·åjson对象ä¸åå为nameçå¼
System.out.print(name);//è¾åºname
} catch (JSONException e) {
}
}
追é®{"id":"1148","Name":"Button4"} ,{"id":"1149","Name":"Button5"} ,{"id":"1150","Name":"Text3"}æ¯å¦è¿ä¸ªæ°æ®çName é®å
å«Buttonçæ°æ®ajax循ç¯åºæ¥...