djson

A different JSON parser for Python.


Keywords
djson, good, json
License
BSD-1-Clause
Install
pip install djson==0.1.1

Documentation

A different JSON parser for Python

https://img.shields.io/travis/damnever/djson.svg?style=flat-square https://img.shields.io/pypi/v/djson.svg?style=flat-square

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/

LICENSE

The BSD 3-Clause License