On Mar 8, 3:43 pm, "Rick  Olson" <[EMAIL PROTECTED]> wrote:
> How are you planning to do date serialization for json?  I did some
> work in Rails and noticed it used "Thu Mar 08 15:41:36 CST 2007",
> which is no good.  I wrote a json plugin for rails that uses the fjson
> gem to parse incoming json, and uses the xml schema time format
> instead.  It's what we use for XML and is easy to parse in any
> language.  A serialized date would then be:
> "2007-03-08T15:43:22-06:00"

There is no good way to serialize Dates into JSON, since there isn't a
Date literal notation.  This made for some heated discussion on the
JS2 mailing list, since all of Crockford's JSON work is going to be
integrated into JS2.

No Date literal means you can't distinguish between
"2007-03-08T15:43:22-06:00" as a date and "2007-03-08T15:43:22-06:00"
as a literal string.  So that means that the parseJSON logic would
have to be explicitly told when a string should be treated as a Date.
Ick.

This is why the JS2 JSON module will punt on this altogether.  I
suggest that our JSON lib do the same.

Cheers,
Andrew


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to