Changed mode of decode_json

This commit is contained in:
Jose Gonzalez 2019-11-28 17:15:26 +01:00
parent 2deee86f53
commit 70780070bd
1 changed files with 1 additions and 1 deletions

View File

@ -179,7 +179,7 @@ sub data_consumer ($$) {
eval {
if ($module->{'macros'} ne '') {
logger ($pa_config, "Decoding json macros from # $module_id plugin command '$command'", 10);
my $macros = decode_json(encode_utf8($module->{'macros'}));
my $macros = JSON->new->allow_nonref->decode(encode_utf8($module->{'macros'}));
my %macros = %{$macros};
if(ref($macros) eq "HASH") {
foreach my $macro_id (keys(%macros))