A different JSON parser for Python
WTF
-_-# :
import json
json.loads(r"""{"a": "good", 123: "fuck!", false: "fuck!!", null: "fuck!!!"}""")
^_^ :
import djson
djson.loads(r"""{"a": "good", 123: "well done!", true: "excellent!!", null: "I love djson!!!"}""")
Installation
pip install djson
APIs
- load(str) -> dict()
- loads(file) -> dict(): file is a iterable file-like object.
- dump(obj, file=sys.stdout, encoder=JSONEncoder): Rewrite JOSNEncoder to support custom object. NOTE: returned string must like this:
'"string"'
.- dumps(obj, encoder=JSONEncoder) -> str
Examples
See examples/