1. 程式人生 > >關於ajax json資料處理

關於ajax json資料處理

ReadExcel read = new ReadExcel();
List<Card> cardlist = read.readxls(url);
JSONArray jsonArray = JSONArray.fromObject(cardlist);
String json = jsonArray.toString();
PrintWriter out = response.getWriter();
out.print(json);
out.flush();
out.close();