omnijsonWraps the best JSON installed, falling back on an internal simplejson | |
Download |
omnijson Ranking & Summary
Advertisement
- License:
- MIT/X Consortium Lic...
- Publisher Name:
- Kenneth Reitz
- Publisher web site:
- http://kennethreitz.com
omnijson Tags
omnijson Description
Wraps the best JSON installed, falling back on an internal simplejson omnijson is a Python library that wraps the best JSON installed, falling back on an internal simplejson.The Problem# Python 2.5.4 (r254:67916, Jun 24 2010, 21:47:25)>>> import anyjsonTraceback (most recent call last): File "< stdin >", line 1, in < module > raise ImportError("No supported JSON module found")ImportError: No supported JSON module foundThe Solution>>> import omnijson as json# \o/UsageLoad the best JSON available:import omnijson as jsonDump some objects:>>> json.loads('{"yo": "dawg"}'){'yo': 'dawg'}Load some objects:>>> json.dumps({'yo': 'dawg'})'{"yo": "dawg"}'Check JSON Engine:>>> json.engine'ujson'InstallInstalling OmniJSON is easy:pip install omnijsonOf, if you must:easy_install omnijsonBut, you really shouldn't do that.
omnijson Related Software