Data::Dumper Request

B

Brent Clark

Hiya

I know we can use JSON, YAML, Marshal etc for representation of the data.

Personally I find the above solutions clunky.

I would do the job if I could (Still learning Ruby), but im hoping with the spirit of open source and communities, I would like to plead with community for someone to please release a gem like perls Data::Dumper.

Hope someone would be so kind as to give me request some thought.

Kind Regards
Brent Clark
 
R

Roger Pack

Brent said:
Hiya

I know we can use JSON, YAML, Marshal etc for representation of the
data.

Personally I find the above solutions clunky.

I would do the job if I could (Still learning Ruby), but im hoping with
the spirit of open source and communities, I would like to plead with
community for someone to please release a gem like perls Data::Dumper.

you can try

Do these scratch your itch?
-r
 
C

Caleb Clausen

Hiya

I know we can use JSON, YAML, Marshal etc for representation of the data.

Personally I find the above solutions clunky.

I would do the job if I could (Still learning Ruby), but im hoping with the
spirit of open source and communities, I would like to plead with community
for someone to please release a gem like perls Data::Dumper.

Hope someone would be so kind as to give me request some thought.

I wrote a gem called Ron (note capitalization; if you use lowercase
spelling, you'll get something else) which serializes ruby data
structures as ruby code which can be eval'd to get back the original
data. Seems to be exactly what you're asking for.

There's also amarshal, which serializes ruby data as ruby code that
reconstructs it, but it's not as declarative (it emits a series of
statements which reconstruct the object, instead of a single
expression) and therefore (IMNSHO) not as pretty.
 
D

David Masover

Hiya

I know we can use JSON, YAML, Marshal etc for representation of the data.

Personally I find the above solutions clunky.

How so?

I mainly used Dumper in Perl for two reasons:
- I wasn't aware of easy options for JSON/YAML/etc for storing data.
- I wanted to see what was actually going on in my objects.

So I'm curious, because I prefer the above solutions to something executable
for the purposes of data storage and transfer -- the only place I'd prefer
this is when #inspect isn't doing a good enough job for investigating stuff in
irb.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top