Skip to content

DJStompZone/djson

 
 

Repository files navigation

A different JSON parser for Python

image

image

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(file) -> dict(): file is a iterable file-like object.
  • loads(str) -> dict()
  • 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

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.2%
  • Makefile 0.8%