pom.xml增加依赖:
<dependency>
<groupId>net.sf.json-lib</groupId>
<artifactId>json-lib</artifactId>
<version>2.4</version>
<classifier>jdk15</classifier>
</dependency>
代码:
import net.sf.json.JSONObject;
JSONObject jsonobject = JSONObject.fromObject(body);
网友评论