FastJson序列化

String post = HttpClientUtils.httpPost(martinUrl + "index/status",new HashMap<>());
            JSONObject object = JSON.parseObject(post);
            String jsonString = object.getJSONArray("data").toJSONString();
            List<MartinResVo> list = JSON.parseArray(jsonString, MartinResVo.class);
            list.forEach(x->{
                x.setChineseDesc(IndexNameEnum.getDescByAlias(x.getIndexAlias()));
            });
            res.setData(list);
posted @ 2018-08-22 10:31 Aiopr 阅读(...) 评论(...) 编辑 收藏