1alibaba
JSONUtils.toJSONString(requestMap); com.alibaba.fastjson.JSON
maven坐标
<!-- https://mvnrepository.com/artifact/com.alibaba/fastjson -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.41</version>
</dependency>
2google
new Gson().toJson(param); com.google.gson.2.2.2.jar
maven坐标
<!-- https://mvnrepository.com/artifact/com.google.code.gson/gson -->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.3.1</version>
</dependency>