mcxiaochi 2021-05-20 14:39 采纳率: 0%
浏览 1173

EntityUtils.toString(response.getEntity())如何处理

EntityUtils.toString(response.getEntity())   返回数据,怎么处理
  • 写回答

4条回答 默认 最新

  • mcxiaochi 2021-05-20 18:12
    关注
        String json=   EntityUtils.toString(response.getEntity());
                ObjectMapper mapper = new ObjectMapper();
                JsonNode root = mapper.readTree(json);
                JsonNode data = root.path("showapi_res_body");
                Map<String,String> map = mapper.convertValue(data, Map.class);
    评论

报告相同问题?