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>
本文对比了阿里巴巴的Fastjson和Google的Gson两种流行的JSON序列化库,提供了各自的使用示例代码及Maven依赖坐标,帮助开发者了解两者之间的差异并选择适合项目的工具。

745

被折叠的 条评论
为什么被折叠?



