mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-28 16:14:21 +02:00
parent
d38eb99ad7
commit
f26c196532
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user