This is an enhanced version of python-cjson, the fast JSON encoder/decoder supporting extension functions to encode/decode arbitrary objects.
New feature: Optional automatic conversion of dict keys to string. Since JSON specification does not allow non-string keys in objects, it's very useful to add optional automatic conversion of dictionary keys. This could be useful when porting code originally written for simplejson that does this by default. The feature can be enabled by passing key2str=True keyword argument to the encode() function. Default behaviour of python-cjson has been preserved, so without this keyword argument encoding of non-string dictionary keys will raise EncodeError. Upgrade only if you need this new feature. This version includes new unit tests for the above feature. All existing and new unit tests are passed with python 2.3.5, 2.4.3 and 2.5.0 without problems. But silent bugs may exists. Download, examples and more information: http://python.cx.hu/python-cjson -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations.html