以前JSON::Parse
はjsonファイルをデコードしていました。ファイルにダンプすると、以下のように表示されます。各リポジトリから「url」を抽出する必要があります。どうすればそれを行うことができますか?要素にアクセスしようとしましたが、アクセスできないようです。助言がありますか?
.json ファイルのデコード方法:
my $json_hash_ref = {};
$json_hash_ref= json_file_to_perl ($REPO_JSON_FILE) or confess "No repos found";
これはデータ ダンプです。
$VAR1 = {
'repositories' => [
{
'size' => 2970,
'watchers' => 49,
'created_at' => '2012-03-20T05:04:42Z',
'url' => 'http://github.cerner.com/aeon-core/aeon-topology',
'open_issues' => 0,
'followers' => 49,
'owner' => 'aeon-core',
'has_downloads' => 1,
'has_issues' => 0,
'language' => 'Java',
'pushed' => '2014-06-17T18:32:37Z',
'private' => ${\$VAR1->{'repositories'}[0]{'has_issues'}},
'name' => 'aeon-topology',
'score' => '1',
'has_wiki' => ${\$VAR1->{'repositories'}[0]{'has_issues'}},
'pushed_at' => '2014-06-17T18:32:37Z',
'description' => '',
'username' => 'aeon-core',
'created' => '2012-03-20T05:04:42Z',
'homepage' => '',
'forks' => 59,
'fork' => ${\$VAR1->{'repositories'}[0]{'has_issues'}},
'type' => 'repo'
},
{
.....
},...