Accidently sent this to John and not the list. PS John, I've also edited it a bit.
---------- Forwarded message ---------- From: Clayton Scott <[EMAIL PROTECTED]> Date: Jul 10, 2006 4:12 PM Subject: Re: [RDBO] YAML and JSON helpers To: John Siracusa <[EMAIL PROTECTED]> On 7/10/06, John Siracusa <[EMAIL PROTECTED]> wrote: > On 7/10/06, Clayton Scott <[EMAIL PROTECTED]> wrote: > > Enough information to do a minimal round trip and structured so you > > can easily get at the parts you need and disregard the ones you don't? > > > > --- > > meta : > > class : My::Object > > columns : > > a: 1 > > b : 2 > > c : 3 > > So no top-level "container" for each serialized object? IOW: Yes, the top level container is "--- " the YAML document delimiter, of which there can be many in a single file or stream, one object per document or make the document an anonymous array of anonymous hashes for multiple objects of the same type: - a: 1 b: 2 c: 3 - a: 2 b: 4 c: 6 I added the My::Object as meta data because I wasn't sure how you were intending to use it there, and I wanted to keep metadata separated from the "column" data. If you just want simple data structures then JSON and YAML have syntax intersections that allow you to produce 1 format of anonymous hashes and arrays that is both valid JSON and valid YAML. http://search.cpan.org/dist/JSON-Syck/lib/JSON/Syck.pm -- Clayton Scott [EMAIL PROTECTED] -- Clayton Scott [EMAIL PROTECTED] ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object