[issue21543] json library fails to serialize objects such as datetime

2014-05-20 Thread Dann Ke
New submission from Dann Ke: I'm using the json library to serialize objects out for web use. Whenever I serialize a datetime or other included python library object (uuid as another example), it fails with TypeError: datetime.datetime(2014, 5, 20, 9, 37, 56, 133627) is not JSON

[issue21543] json library fails to serialize objects such as datetime

2014-05-20 Thread Dann Ke
Dann Ke added the comment: I was reading the older 2.7 docs and it didn't click that default() was what I wanted. Thank you for clarifying. On Tue, May 20, 2014 at 10:09 AM, akira rep...@bugs.python.org wrote: akira added the comment: json module already allows you to customize