I had the same problem: my Json data were going into an Html form. I solved simply converting my date object into string with str() before dumping Json data: I do not know if this is suitable for your case
carlo On 30 Apr, 06:28, weheh <richard_gor...@verizon.net> wrote: > I need to run a datetime through JSON and it doesn't work. I found > Timothy Farrell's workaround here: > https://mdp.cti.depaul.edu/web2py_wiki/default/wiki/JSONdatetime > but for some reason, it doesn't work for me. I tried: > > # timothy's code goes up here > > def test(): > return dumps(datetime.datetime(2009,04,30,00,00,00)) > > and I get an error message. Anybody else experiencing problems with > JSON and datetime? > > Is Timothy's code supposed to work with dicts that have datetimes > either as keys or values? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---