This repository has been archived by the owner on Oct 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Home
wenshao edited this page Apr 23, 2016
·
72 revisions
English | [中文] (https://github.com/Alibaba/fastjson/wiki/%E9%A6%96%E9%A1%B5)
https://github.com/alibaba/fastjson/wiki/%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98
Fastjson is a JSON processor (JSON parser + JSON generator) written in Java:
- FAST (measured to be faster than any other Java parser and databinder, includes jackson. )
- Powerful (full data binding for common JDK classes as well as any Java Bean class, Collection, Map, Date or enum)
- Zero-dependency (does not rely on other packages beyond JDK)
- Open Source (Apache License 2.0)
android developer plz see Here
or via Maven:
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>VERSION_CODE</version>
</dependency>
or via Gradle:
compile 'com.alibaba:fastjson:VERSION_CODE'
replace VERSION_CODE
with real version name such as 1.2.10
released in Here or Here
Samples : https://github.com/alibaba/fastjson/wiki/Samples-DataBind
Times are in nanoseconds, sizes are in bytes.
create ser +same deser +shal +deep total size +dfl
kryo 119 1335 1273 1562 1709 1689 3024 223 140
java-manual 119 2129 2055 1005 1031 1062 3191 255 147
json/fastjson/databind 117 1809 1687 1741 1786 1907 3715 486 262
msgpack 117 1827 1582 1985 2020 2118 3945 233 146
json/jackson/manual 118 1672 1501 2235 2232 2365 4037 468 253
protobuf 227 2939 1362 1626 1661 1965 4904 239 149
thrift 242 3157 2898 2031 2116 2194 5351 349 197
json/jackson/databind 119 2851 2726 3941 4008 4154 7005 485 261
hessian 117 6135 5513 10082 10204 10311 16446 501 313
json/google-gson/databind 117 11309 11304 7913 7967 8076 19385 486 259
json/json-lib-databind 119 45547 45114 145951 145866 146582 192129 485 263
Columns:
- create: create an object (using the classes specified by the serialization tool)
- ser: create an object and serialize it
- +same: serialize the same object (i.e. doesn’t include creation time)
- deser: deserialize an object
- +shal: deserialize an object and access the top-level fields
- +deep: deserialize an object and access all the fields
- total: create + serialize + deserialize and access all fields
- size: the size of the serialized data
- +dfl: the size of the serialized data compressed with Java’s built-in implementation of DEFLATE (zlib)
Test code : https://github.com/wenshao/jvm-serializers
如有需要修改本注脚,请联系阿里巴巴,
© Alibaba Fastjson Develop Team
注明: 版权所有阿里巴巴,请注明版权所有者
If you need to amend this footnote, please contact Alibaba.
© Alibaba Fastjson Develop Team
Note: Copyright Alibaba, please indicate the copyright owner