No such thing as a small change | |
PerlMonks |
Re: Formatting JSON the right wayby hippo (Bishop) |
on Aug 20, 2014 at 12:08 UTC ( [id://1098105]=note: print w/replies, xml ) | Need Help?? |
It looks to me like your while loop is overwriting the values in your hash at every iteration. It would probably be better to construct an array of hashrefs to store the data instead and then convert that array to your JSON at the end.
In Section
Seekers of Perl Wisdom
|
|