Seaside-JSON-Core-DiegoLont.25

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Seaside-JSON-Core-DiegoLont.25

Philippe Marschall
Hi

I think this should render as a string otherwise we get invalid JSON.
And tests would be nice, eg

testDateAndTime
    self
        assert: [ :json |
            | date |
            date := DateAndTime year: 2007 month: 11 day: 21 hour: 14
minute: 42 second: 48 offset: (Duration days: 0 hours: 2 minutes: 0
seconds: 0).
            json array: [
                json dateAndTime: date ] ]
        gives: '["2007-11-21T14:42:48+02:00"]'

Cheers
Philippe
_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
Reply | Threaded
Open this post in threaded view
|

Re: Seaside-JSON-Core-DiegoLont.25

DiegoLont
Hi Philippe,

Thx for the catch. Yes I was missing a test case and you are right it is very easy to make valid json out of it. Added test case and fixed implementation.

Diego

On 16 Feb 2014, at 22:58, Philippe Marschall <[hidden email]> wrote:

> Hi
>
> I think this should render as a string otherwise we get invalid JSON.
> And tests would be nice, eg
>
> testDateAndTime
>    self
>        assert: [ :json |
>            | date |
>            date := DateAndTime year: 2007 month: 11 day: 21 hour: 14
> minute: 42 second: 48 offset: (Duration days: 0 hours: 2 minutes: 0
> seconds: 0).
>            json array: [
>                json dateAndTime: date ] ]
>        gives: '["2007-11-21T14:42:48+02:00"]'
>
> Cheers
> Philippe
> _______________________________________________
> seaside-dev mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev

_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev