日期:2014-05-16  浏览次数:20502 次

json 解析工具对比(jsonic,gson,fastjson)

test code:?https://github.com/joesmart/json_compare

?

?

?

fastjson convert to json:233.5 ms

fastJson string size:612

fastjson from json string to object - 71.34 ms

?

gson convert to json:37.34 ms

gson string size:667

gson from json string to object - 11.33 ms

?

jackson convert to json:488.9 ms

jackSon size:612

jackson from json string to object - 55.53 ms

?

jsonic convert to json:51.23 ms

jsonic size:612

jsonic from json string to object - 3.762 ms

--------------------------

?

fastjson convert to json:4.068 ms

fastJson string size:612

fastjson from json string to object - 162.6 μs

?

gson convert to json:440.9 μs

gson string size:667

gson from json string to object - 2.252 ms

?

jackson convert to json:12.11 ms

jackSon size:612

jackson from json string to object - 20.30 ms

?

jsonic convert to json:468.0 μs

jsonic size:612

jsonic from json string to object - 868.7 μs

--------------------------

?

fastjson convert to json:1.272 ms

fastJson string size:612

fastjson from json string to object - 227.2 μs

?

gson convert to json:498.7 μs

gson string size:667

gson from json string to object - 1.158 ms

?

jackson convert to json:14.53 ms

jackSon size:612

jackson from json string to object - 22.79 ms

?

jsonic convert to json:793.7 μs

jsonic size:612

jsonic from json string to object - 1.198 ms

--------------------------

?

fastjson convert to json:1.463 ms

fastJson string size:612

fastjson from json string to object - 154.1 μs

?

gson convert to json:475.3 μs

gson string size:667

gson from json string to object - 1.282 ms

?

jackson convert to json:12.31 ms

jackSon size:612

jackson from json string to object - 22.11 ms

?

jsonic convert to json:3.227 ms

jsonic size:612

jsonic from json string to object - 4.317 ms

--------------------------

?

fastjson convert to json:4.569 ms

fastJson string size:612

fastjson from json string to object - 155.9 μs

?

gson convert to json:458.1 μs

gson string size:667

gson from json string to object - 1.303 ms

?

jackson convert to json:12.59 ms

jackSon size:612

jackson from json string to object - 20.28 ms

?

jsonic convert to json:740.0 μs

jsonic size:612

jsonic from json string to object - 1.560 ms

--------------------------

?

fastjson convert to json:2.176 ms

fastJson string size:612

fastjson from json string to object - 173.5 μs

?

gson convert to json:475.7 μs

gson string size:667

gson from json string to object - 2.426 ms

?

jackson convert to json:21.41 ms

jackSon size:612

jackson from json string to object - 24.61 ms

?

jsonic convert to json:532.6 μs

jsonic size:612

jsonic from json string to object - 1.410 ms

--------------------------

?

fastjson convert to json:1.872 ms

fastJson string size:612

fastjson from json string to object - 265.2 μs

?

gson convert to json:699.3 μs

gson string size:667

gson from json string to object - 1.378 ms

?

jackson convert to json:10.58 ms

jackSon size:612

jackson from json string to object - 20.79 ms

?

jsonic convert to json:551.2 μs

jsonic size:612

jsonic from json string to object - 1.646 ms

--------------------------

?

fastjson convert to json:1.962 ms

fastJson string s