没啥写的了
给新手的示例
1、借助如下包
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.core.type.TypeReference;
2、转换方法 List<YourClass> list = objectMapper.convertValue(lists, new TypeReference<List<YourClass>>(){});
3、搞定
没啥写的了
给新手的示例
1、借助如下包
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.core.type.TypeReference;
2、转换方法 List<YourClass> list = objectMapper.convertValue(lists, new TypeReference<List<YourClass>>(){});
3、搞定