You might want to look at "Data::Dump", its function tries to do that automatically.
But that will only be useful for debugging purposes, to look pretty in your terminal.

Also check David's Dancer::Plugin::Debug

On Sun, Feb 27, 2011 at 5:31 AM, Puneet Kishor <punk.kish@gmail.com> wrote:
punkish@Lucknow ~$curl 'http://dm.local/dm.json?var=prcp&from=1980-1-1&to=1980-2-2'
{
 "prcp" : [
0,
1,
1,
0,
..
]
}

Is there a way to get that curl output to be more compact, like so

{"prcp": [0,1,1,0, .. ]}


On the server side all I am doing is

return {'prcp' => \@vals};

--
Puneet Kishor



_______________________________________________
Dancer-users mailing list
Dancer-users@perldancer.org
http://www.backup-manager.org/cgi-bin/listinfo/dancer-users