JSON字符串转List集合对象

import  com.alibaba.fastjson.JSON;

Import com.alibaba.fastjson.TypeReference;


List<Object> obj= JSON.parseObject(strJSON,
new TypeReference<ArrayList<Object>>() {

});


strJSON 是前端传来的json字符串


如果出现乱码的话需要

String newJson = StringEscapeUtils.unescapeHtml4(strJSON ); // 转码

猜你喜欢

转载自blog.csdn.net/qq_37342374/article/details/79738065