引入fastjson
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.39</version>
</dependency>
转实体类
//知道泛型
Model model = JSON.parseObject(jsonstring, new TypeReference<Model>(){});
//转成Object
Object object= JSON.parseObject(jsonstring, new TypeReference<Object>(){});