On 9/18/06, Robert Dobbs <[EMAIL PROTECTED]> wrote:
> Or, if another set of 'flators could be specified for a field, would it be
> possible to build a Javascript Date object into the JSON construct, for
> example?  Some way to put in a javascript eval literal "new Date(
> ".join(',', map $dt->$_, qw( year month day hours minute second millisecond
> ) )." ); ";   # ... or something.

That's something I couldn't figure out how to do, although I tried. I
think it's something not possible to be done using JSON::Syck so I
might try the plain old pure perl JSON.

> Hrmm, well maybe it is easier to keep the terse deflated value in the JSON
> thing, and in your Javascript application you could write functions to throw
> your objects through that inflate them back into Javascript objects of other
> types.

The problem with this approach is that your JS code will need to know
about your backend's date format. Kind of messy.

-Nilson Santos F. Jr.

_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/

Reply via email to