This commit is contained in:
qgarnier 2021-01-28 13:49:41 +01:00 committed by GitHub
parent 0677a27ab2
commit 96fe117c82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -91,7 +91,7 @@ sub json_decode {
$options{content} =~ s/\r//mg;
my $decoded;
eval {
$decoded = JSON::XS->new->utf8->decode($options{content});
$decoded = JSON::XS->new->allow_nonref(1)->utf8->decode($options{content});
};
if ($@) {
$self->{output}->add_option_msg(short_msg => "Cannot decode json response: $@");
@ -117,7 +117,6 @@ sub teams_post_notification {
$self->{output}->add_option_msg(short_msg => 'Error while retrieving data (add --debug option for detailed message)');
$self->{output}->option_exit();
}
use Data::Dumper; print Dumper($decoded);
return $decoded;
}