- or download this
use JSON;
%HoA = ('foo' => [1,2,3], 'bar' => ['a','b','c']);
print "plain:\n".JSON->new->encode(\%HoA)."\n";
print "pretty:\n".JSON->new->pretty->encode(\%HoA);
- or download this
plain: {"foo":[1,2,3],"bar":["a","b","c"]}
pretty: {
...
"c"
]
}
- or download this
{
"foo" : [1,2,3],
"bar" : ["a","b","c"]
}