ListObject转换JSONArray及互转

List<Object> 转换 JSONArray
List<IsAddModel> isAddList = isAddService.selectAddList(type);
JSONArray jsonArray = JSONArray.parseArray(JSON.toJSONString(isAddList));
JSONArray 转换List<Object>
List<ProdTypeMappingBean> counts = JSONArray.parseArray(details.toString(), ProdTypeMappingBean.class);

猜你喜欢

转载自blog.csdn.net/sinat_32867867/article/details/80830656