功能概述:将集合转换成json,传递到前端进行显示
List<Weather> weatherList=new ArraryList<Weather>;
String json=JSON.toJSONString(weatherList);
respone.setCharacterEncoding("utf-8");
respone.setContentType("text/html;charset=UTF-8");
PrintWriter out=response.getWriter();
out.write(json);
out.flush();
out.close();