JAVA 将JSON转化为实体类List

List<CategoriesVO> categoriesVOList = JSON.parseArray(responseData.getData().toString(), CategoriesVO.class);
CategoriesVO categoriesVO=((JSONObject)JSONObject.toJSON(((List)responseData.getData()).get(0))).toJavaObject(CategoriesVO.class);

List<CategoriesVO> list = JSON.parseArray(jsonObject.getJSONArray("list").toString(),CategoriesVO.class);// JSONObject jsonObject

 

posted @ 2021-02-25 10:35  哎丫丫呀喂  阅读(475)  评论(0编辑  收藏  举报