fastjson


fastjson

Maven

1
2
3
4
5
6
7
8
9
10
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.73</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.1.72.android</version>
</dependency>

Gradle via JCenter

1
2
compile 'com.alibaba:fastjson:1.2.73'
compile 'com.alibaba:fastjson:1.1.72.android'

使用

1
2
String text = JSON.toJSONString(obj); //序列化
VO vo = JSON.parseObject("{...}", VO.class); //反序列化