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