Yes, it works for date but it does not work for time.  I'm not sure how 
this would look implemented into web2py.  (You should read the page more 
thoroughly.)

-Tim

mdipierro wrote:
> fantastic. can you email me a patch?
> does it work for date and time too?
>
> On Jan 14, 11:35 am, Timothy Farrell <[email protected]> wrote:
>   
>> BAM!
>>
>> https://mdp.cti.depaul.edu/web2py_wiki/default/wiki/JSONdatetime
>>
>>
>>
>> carlo wrote:
>>     
>>> Thank you Tim, I am looking forward to it.
>>>       
>>> carlo
>>>       
>>> On 14 Gen, 18:18, Timothy Farrell <[email protected]> wrote:
>>>       
>>>> That's funny, I just dealt with this issue yesterday.  I'll put a tip on
>>>> the wiki and link it.
>>>>         
>>>> -tim
>>>>         
>>>> carlo wrote:
>>>>         
>>>>> I had this problem trying to serialize a (SQLite) date field with
>>>>> simplejson  through "js.dumps(mydata)" :
>>>>>           
>>>>> File "C:\Python25\web2py\gluon\contrib\simplejson\encoder.py", line
>>>>> 332, in default
>>>>>     raise TypeError("%r is not JSON serializable" % (o,))
>>>>> TypeError: datetime.date(2009, 1, 14) is not JSON serializable
>>>>>           
>>>>> It seems something similar happened in Django:
>>>>>           
>>>>> http://code.djangoproject.com/ticket/2460
>>>>>           
>>>>> Is there any workaround?
>>>>>           
>>>>> carlo
>>>>>           
>>>> --
>>>> Timothy Farrell <[email protected]>
>>>> Computer Guy
>>>> Statewide General Insurance Agency (www.swgen.com)
>>>>         
>> --
>> Timothy Farrell <[email protected]>
>> Computer Guy
>> Statewide General Insurance Agency (www.swgen.com)
>>     
> >
>   

-- 
Timothy Farrell <[email protected]>
Computer Guy
Statewide General Insurance Agency (www.swgen.com)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to