我正在尝试解析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)