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