相关疑难解决方法(0)

使用Perl进行简单的JSON解析

我正在尝试解析Facebook Graph API JSON结果,我遇到了一些麻烦.

我希望做的是打印股票数量:

my $trendsurl = "https://graph.facebook.com/?ids=http://www.filestube.com";
my $json;
{
  local $/; #enable slurp
  open my $fh, "<", $trendsurl;
  $json = <$fh>;
}

my $decoded_json = @{decode_json{shares}};
print $decoded_json;
Run Code Online (Sandbox Code Playgroud)

perl json

35
推荐指数
1
解决办法
8万
查看次数

标签 统计

json ×1

perl ×1