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);