Skip to main content

A different JSON parser for Python.

Project description

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/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for djson, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size djson-0.1.1-py2.py3-none-any.whl (8.7 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page