当前位置: 代码迷 >> JavaScript >> json 解析工具对照(jsonic,gson,fastjson)
  详细解决方案

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

热度:1109   发布时间:2012-06-28 15:20:04.0
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 size:612

fastjson from json string to object - 170.8 μs

?

gson convert to json:438.7 μs

gson string size:667

gson from json string to object - 1.144 ms

?

jackson convert to json:9.849 ms

jackSon size:612

jackson from json string to object - 13.93 ms

?

jsonic convert to json:407.9 μs

jsonic size:612

jsonic from json string to object - 1.215 ms

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

?

fastjson convert to json:1.540 ms

fastJson string size:612

fastjson from json string to object - 167.2 μs

?

gson convert to json:608.1 μs

gson string size:667

gson from json string to object - 1.134 ms

?

jackson convert to json:9.651 ms

jackSon size:612

jackson from json string to object - 15.96 ms

?

jsonic convert to json:891.3 μs

jsonic size:612

jsonic from json string to object - 1.186 ms

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

?

fastjson convert to json:1.755 ms

fastJson string size:612

fastjson from json string to object - 168.5 μs

?

gson convert to json:485.6 μs

gson string size:667

gson from json string to object - 1.405 ms

?

jackson convert to json:14.01 ms

jackSon size:612

jackson from json string to object - 24.72 ms

?

jsonic convert to json:736.8 μs

jsonic size:612

jsonic from json string to object - 1.407 ms

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

?

fastjson convert to json:1.976 ms

fastJson string size:612

fastjson from json string to object - 249.8 μs

?

gson convert to json:896.7 μs

gson string size:667

gson from json string to object - 1.963 ms

?

jackson convert to json:17.51 ms

jackSon size:612

jackson from json string to object - 30.72 ms

?

jsonic convert to json:581.9 μs

jsonic size:612

jsonic from json string to object - 1.237 ms

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

?

fastjson convert to json:1.613 ms

fastJson string size:612

fastjson from json string to object - 204.6 μs

?

gson convert to json:707.9 μs

gson string size:667

gson from json string to object - 1.744 ms

?

jackson convert to json:12.41 ms

jackSon size:612

jackson from json string to object - 11.95 ms

?

jsonic convert to json:496.9 μs

jsonic size:612

jsonic from json string to object - 1.175 ms

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

?

fastjson convert to json:1.559 ms

fastJson string size:612

fastjson from json string to object - 236.7 μs

?

gson convert to json:690.7 μs

gson string size:667

gson from json string to object - 1.809 ms

?

jackson convert to json:10.12 ms

jackSon size:612

jackson from json string to object - 14.40 ms

?

jsonic convert to json:572.4 μs

jsonic size:612

jsonic from json string to object - 808.2 μs

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

?

fastjson convert to json:1.086 ms

fastJson string size:612

fastjson from json string to object - 153.1 μs

?

gson convert to json:535.8 μs

gson string size:667

gson from json string to object - 1.653 ms

?

jackson convert to json:10.72 ms

jackSon size:612

jackson from json string to object - 16.61 ms

?

jsonic convert to json:379.5 μs

jsonic size:612

jsonic from json string to object - 1.134 ms

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

?

fastjson convert to json:1.398 ms

fastJson string size:612

fastjson from json string to object - 179.8 μs

?

gson convert to json:426.9 μs

gson string size:667

gson from json string to object - 1.449 ms

?

jackson convert to json:8.415 ms

jackSon size:612

jackson from json string to object - 18.60 ms

?

jsonic convert to json:616.2 μs

jsonic size:612

jsonic from json string to object - 1.077 ms

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

?

fastjson convert to json:1.460 ms

fastJson string size:612

fastjson from json string to object - 235.4 μs

?

gson convert to json:1.109 ms

gson string size:667

gson from json string to object - 1.836 ms

?

jackson convert to json:14.90 ms

jackSon size:612

jackson from json string to object - 17.56 ms

?

jsonic convert to json:2.932 ms

jsonic size:612

jsonic from json string to object - 3.192 ms

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

?

fastjson convert to json:3.473 ms

fastJson string size:612

fastjson from json string to object - 218.7 μs

?

gson convert to json:569.2 μs

gson string size:667

gson from json string to object - 1.618 ms

?

jackson convert to json:9.802 ms

jackSon size:612

jackson from json string to object - 24.33 ms

?

jsonic convert to json:674.9 μs

jsonic size:612

jsonic from json string to object - 1.087 ms

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

?

fastjson convert to json:1.668 ms

fastJson string size:612

fastjson from json string to object - 246.2 μs

?

gson convert to json:769.8 μs

gson string size:667

gson from json string to object - 1.472 ms

?

jackson convert to json:12.43 ms

jackSon size:612

jackson from json string to object - 15.68 ms

?

jsonic convert to json:540.3 μs

jsonic size:612

jsonic from json string to object - 933.8 μs

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

?

fastjson convert to json:1.306 ms

fastJson string size:612

fastjson from json string to object - 223.2 μs

?

gson convert to json:658.7 μs

gson string size:667

gson from json string to object - 1.471 ms

?

jackson convert to json:9.175 ms

jackSon size:612

jackson from json string to object - 14.77 ms

?

jsonic convert to json:399.8 μs

jsonic size:612

jsonic from json string to object - 920.2 μs

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

?

fastjson convert to json:1.281 ms

fastJson string size:612

fastjson from json string to object - 216.8 μs

?

gson convert to json:587.3 μs

gson string size:667

gson from json string to object - 1.417 ms

?

jackson convert to json:9.291 ms

jackSon size:612

jackson from json string to object - 9.504 ms

?

jsonic convert to json:603.6 μs

jsonic size:612

jsonic from json string to object - 1.016 ms

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

?

?

?

  相关解决方案