JAVA 字符串类型的JSON转实体类

String str={"status":200,"msg":"查询成功","data":{"end_date":"-","tax_total":"企业选择不公示"}}

JSONObject qxbJson = JSONObject.parseObject(str);
        SrmSlcQxbInfoVO srmSlcQxbInfoVO = JSON.toJavaObject(qxbJson.getJSONObject("data"),SrmSlcQxbInfoVO.class);
        System.out.println("srmSlcQxbInfoVO:"+srmSlcQxbInfoVO);

 

posted @ 2021-02-08 17:04  哎丫丫呀喂  阅读(224)  评论(0编辑  收藏  举报