PerlでJSON形式データ作成・出力

Nid: 5
  • Posted on: 31 May 2014
  • By: Anonymous

 

use Encode;
use JSON;

my $data_to_json = {
  name => $name,
  address => \@address,
  phone => \@phone
};
print encode_json($data_to_json) . "\n";