Re: [Cgi-session-user] CGI::Session::Serialize::yaml (JSON, too?)
Brought to you by:
sherzodr
From: Tyler M. <ty...@yi...> - 2006-02-16 13:34:42
|
Mark Stosberg <ma...@su...> wrote: > On Wed, Feb 15, 2006 at 06:57:36PM -0500, Cees Hek wrote: > > On 2/15/06, Tyler MacDonald <ty...@yi...> wrote: > > > Mark Stosberg <ma...@su...> wrote: > > > > I'm a YAML fan too, as well as CGI::Session co-maintainer. > > > I'm really glad you support this... having sessions work in a > > > cross-language way in CGI::Session is going to open the door for some very > > > powerful mod_perl magic. :) > > > > Might be a good time to support a JSON [1] version as well... > > I'm not sure if you are aware, but JSON is a proper subset of YAML. > See: > http://redhanded.hobix.com/inspect/yamlIsJson.html > > So if we just store the data in JSON format, we've supported both! > > In that sense, it does seem a little silly to have drivers for both, but > I could see edge cases where people want a feature in YAML that's not in > JSON...maybe the feature to have references to other parts of the data > structure. Because they are marketed differently and JSON is just a subset, I think it makes sense to have serializers for both. Luckily, somebody's already gone to the trouble of setting up a compatible API for us : http://search.cpan.org/dist/JSON-Syck/lib/JSON/Syck.pm :-) - Tyler |