humangeo/rawes — pull request #5 by atkinson (2012-11-10 12:36:20+00:00)
Title: Support transparent serialisation of datetimes at the expense of anyjson

Hello,

I'm not sure if you're interested in this, but I thought I'd offer it as it was useful to me.

I needed to serialise datetimes, but to do this you must pass an encoder function to the JSON implementation using the "default" keyword. Unfortunately this isn't supported by anyjson.

Given that since 2.6 simplejson is in the standard library (import json), it seems that the need for anyjson is less than it once was. I included a "try: import simplejson as json except: import json" so that people can still get faster JSON, if they need it [1].

[1] I read that current simplejson is as fast as cjson, and both are faster than the older simplejson in stdlib.

cheers

rich