is there any elegant way to make Python JSON encoder support datetime? some 3rd party module or easy hack?
I am using tornado\'s database wrapper to fetch some rows
json.dumps(r, default=lambda o: o.isoformat() if hasattr(o, 'isoformat') else o)