推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
myyou
V2EX  ›  Python

python 中 simplejson 和 json 的区别是什么?

  •  
  •   myyou · Apr 22, 2016 · 7723 views
    This topic created in 3850 days ago, the information mentioned may be changed or developed.
    5 replies  •  2016-04-23 15:16:49 +08:00
    liyj144
    liyj144
    Apr 22, 2016❤️1
    1
    参考 http://stackoverflow.com/questions/712791/what-are-the-differences-between-json-and-simplejson-python-modules , simplejson 更新速度频繁些,使用 C 类库的情况下速度也要快很多, 但是 json 库在 python2.6 之后已经内置了,可以直接引用。
    myyou
    myyou
    OP
    Apr 22, 2016
    2
    @liyj144 明白了,谢谢
    antiagainst
    antiagainst
    Apr 23, 2016❤️1
    3
    simplejson 的 error message 要好于 json 。
    ming2281
    ming2281
    Apr 23, 2016
    4
    有 C 的实现, 速度不要太快!
    myyou
    myyou
    OP
    Apr 23, 2016
    5
    @ming2281 按照 liyj144 提供的测试,来看 simplejson 在 loads 是要快, dumps 要慢!
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2102 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 02:43 · PVG 10:43 · LAX 18:43 · JFK 21:43
    ♥ Do have faith in what you're doing.