字符串转json

字符串转json
Map mapList = null;
mapList = BeanUtils.toBean(entity.getTagsInfo(), Map.class);
Collection valueCollection = mapList.values();
List taglist = new ArrayList(valueCollection);
detail.setTagList(taglist);

entity.getTagsInfo()是json字符串{“k1”:“v1”,“k2”:“k2”,“k3”:“v3”}

©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页