摘要:
通俗JavaBean(以User为例)转成json格局1.转成JSONArray类型User user = new User();user.setUsername("cxl");user.setPassword("1234");JSONArray json = JSONArray.Object(user);System.out.println(json);//[{"password":"1234","username":"cxl"}]response.getWriter(). 阅读全文