Help for this page

Select Code to Download


  1. 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);
    
  2. or download this
    plain: {"foo":[1,2,3],"bar":["a","b","c"]}
    pretty: {
    ...
          "c"
       ]
    }
    
  3. or download this
    {
       "foo" : [1,2,3],
       "bar" : ["a","b","c"]
    }