Python - json和simplejson比较(转)


From:https://stackoverflow.com/questions/712791/what-are-the-differences-between-json-and-simplejson-python-modules

加入python stdlib时间

json: 2.6

simplejson: 2.4+

simplejson比json更新快, simplejson支持的python版本范围更广。

一种代码导入实践:

try: 
    import simplejson as json
except ImportError: 
    import json

 

simplejson和json的性能:

For dumping, json is faster than simplejson. For loading, simplejson is faster.


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM