[stackoverflow] [progress Openedge Abl] Perl V5.18.1 Json Issue

Status
Not open for further replies.
S

Supervision

Guest
Recently I'd noticed that an old code with json_encode() and json_decode() for example:

json_encode({});


which worked fine in the past, now crashes with the error:


hash- or arrayref expected (not a simple scalar, use allow_nonref to allow this)

The allow_nonref() really helps and this works fine:

$json = JSON->new;
$json->allow_nonref;
$json->encode({});


Does someone know another way to resolve the issue, so you don't have to rewrite code in every place where these functions are used?

Continue reading...
 
Status
Not open for further replies.
Top