weird json
This commit is contained in:
parent
c7f0181209
commit
eaf10f7d6e
|
@ -2390,12 +2390,12 @@ sub p_encode_json {
|
||||||
################################################################################
|
################################################################################
|
||||||
sub p_decode_json {
|
sub p_decode_json {
|
||||||
my ($pa_config, $data) = @_;
|
my ($pa_config, $data) = @_;
|
||||||
|
|
||||||
# Initialize JSON manager.
|
|
||||||
my $json = JSON->new->allow_nonref;
|
|
||||||
my $decoded_data;
|
my $decoded_data;
|
||||||
|
|
||||||
if ($JSON::VERSION > 2.90) {
|
if ($JSON::VERSION > 2.90) {
|
||||||
|
# Initialize JSON manager.
|
||||||
|
my $json = JSON->new->allow_nonref;
|
||||||
|
|
||||||
$decoded_data = $json->decode($data);
|
$decoded_data = $json->decode($data);
|
||||||
} else {
|
} else {
|
||||||
if (!is_empty($decoded_data)) {
|
if (!is_empty($decoded_data)) {
|
||||||
|
|
Loading…
Reference in New Issue