Last active
December 2, 2021 05:15
-
-
Save sironekotoro/09954632ea3c79f899139e808bbda2ca to your computer and use it in GitHub Desktop.
Perl入学式用 気象庁非公式API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use HTTP::Tiny; | |
use JSON::PP; # 追加 | |
my $url | |
= 'https://www.jma.go.jp/bosai/forecast/data/overview_forecast/130000.json'; | |
my $response = HTTP::Tiny->new()->get($url); | |
my $content = $response->{content}; | |
my $decoded_content = JSON::PP->new->decode($content); #追加 | |
print $decoded_content->{targetArea}; #追加 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment