JSON-PP icon indicating copy to clipboard operation
JSON-PP copied to clipboard

boolean encoding should recognize PL_sv_yes, PL_sv_no

Open karenetheridge opened this issue 5 years ago • 1 comments

This is inconsistent with Cpanel::JSON::XS's behaviour:

perl -MCpanel::JSON::XS -wle'print Cpanel::JSON::XS->new->allow_nonref(1)->encode(!0)'
true
perl -MJSON::PP -wle'print JSON::PP->new->allow_nonref(1)->encode(!0)'
1

karenetheridge avatar Mar 26 '20 20:03 karenetheridge

There isn't really any reasonable way to do this in older perl versions, but it will work in perl 5.35.10+ with JSON::PP 4.08 and newer.

haarg avatar Apr 25 '22 23:04 haarg