Help for this page

Select Code to Download


  1. or download this
    my $json = JSON->new; 
    $json->canonical(1);
    my $json_str = $json->encode($hashref);
    print $json_str;
    
  2. or download this
    my $json_str = to_json($hashref, {canonical => 1});