Skip to content

Doist/python-cjson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-cjson
============

This is modified and improved version of the python-cjson module, original
version of which can be found here: https://pypi.python.org/pypi/python-cjson

Differences from upstream:

* We allow to use integer and longs as object keys (their are converted to
  strings as you would expect)
* Handle object __json__ attributes. If parser doesn't know how to convert an
  object to JSON, it searches for the '__json__' callable attribute, invokes
  it, and then uses return value instead of original object.
* Convert datetime instances to strings looking
  like DATE[[YYYY-MM-DD HH:MM:SS]]

------------------------------------------------------------------------------

This module implements a very fast JSON encoder/decoder for Python.

JSON stands for JavaScript Object Notation and is a text based lightweight
data exchange format which is easy for humans to read/write and for machines
to parse/generate. JSON is completely language independent and has multiple
implementations in most of the programming languages, making it ideal for
data exchange and storage.

The module is written in C and it is up to 250 times faster when compared to
the other python JSON implementations which are written directly in python.
This speed gain varies with the complexity of the data and the operation and
is the the range of 10-200 times for encoding operations and in the range of
100-250 times for decoding operations.