Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boolean encoding should recognize PL_sv_yes, PL_sv_no #49

Open
karenetheridge opened this issue Mar 26, 2020 · 1 comment
Open

boolean encoding should recognize PL_sv_yes, PL_sv_no #49

karenetheridge opened this issue Mar 26, 2020 · 1 comment

Comments

@karenetheridge
Copy link

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 karenetheridge changed the title boolean encoding should recognize SV_YES, SV_NO boolean encoding should recognize PL_sv_yes, PL_sv_no Mar 26, 2020
@haarg
Copy link
Contributor

haarg commented Apr 25, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants