Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 22 lines (14 sloc) 237 Bytes
#!/usr/bin/perl
use strict;
use warnings;
use JSON;
my $json = new JSON;
my $obj = {
a => 1,
b => {
dos => 3,
}
};
my $js = $json->objToJson($obj);
print $js = $json->objToJson($obj, {pretty => 1, indent => 2});
print "\n";