search

Home  >  Q&A  >  body text

java - 大家用什么json序列化工具,fastjson、gson、jackson?

之前一直用着jackson,还没遇到过坑,最近在搭框架,希望用过的朋友给个建议。fastjson、gson、jackson 大家用的是哪个,遇到过什么坑,你个人使用感觉这几个的优劣是什么,谢谢。

高洛峰高洛峰2783 days ago752

reply all(9)I'll reply

  • ringa_lee

    ringa_lee2017-04-18 09:30:04

    Fastjson Jackson, choose one, but swagger integrates springmvc to generate api that does not currently support fastjson, which makes me feel sad...Jackson is more famous and has better support. Don’t be too obsessed with performance. This overhead is not enough. Become a bottleneck

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-18 09:30:04

    Fastjson can be used, supports various serializations, and has complete information. fastjson is about 6 times faster than gson. The test results are here: https://github.com/eishay/jvm-serializers/wiki/Staging-Results

    reply
    0
  • PHP中文网

    PHP中文网2017-04-18 09:30:04

    Use jackson because spring mvc uses it by default.

    reply
    0
  • ringa_lee

    ringa_lee2017-04-18 09:30:04

    I have used org.json (github address), and then I learned that fastjson is known as the fastest, so I used Alibaba’s. I don’t know if it is true, and I haven’t tested it yet

    reply
    0
  • PHPz

    PHPz2017-04-18 09:30:04

    UltraJson written in pure C

    reply
    0
  • PHPz

    PHPz2017-04-18 09:30:04

    fastjson

    reply
    0
  • ringa_lee

    ringa_lee2017-04-18 09:30:04

    Alibaba’s fastjson feels very convenient and smooth

    reply
    0
  • ringa_lee

    ringa_lee2017-04-18 09:30:04

    Using PHPjson_encode()

    reply
    0
  • PHPz

    PHPz2017-04-18 09:30:04

    Hijson tool is small but very convenient

    reply
    0
  • Cancelreply