in reply to How to insert a string unknown contents into json consistently?
This is how
use JSON; my %stuff = ( ro => "...", sham => "...", bo => "...anything here" ); my $json = JSON->new->utf8(1)->pretty(1)->encode( \%stuff ); print $json; __END__ { "ro" : "...", "bo" : "...anything here", "sham" : "..." }
Anything other than this is weak sauce :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to insert a string unknown contents into json consistently?
by Anonymous Monk on Apr 22, 2015 at 04:00 UTC |