… | |
… | |
1015 | Other unblessed references are generally not allowed and will cause an |
1015 | Other unblessed references are generally not allowed and will cause an |
1016 | exception to be thrown, except for references to the integers C<0> and |
1016 | exception to be thrown, except for references to the integers C<0> and |
1017 | C<1>, which get turned into C<false> and C<true> atoms in JSON. You can |
1017 | C<1>, which get turned into C<false> and C<true> atoms in JSON. You can |
1018 | also use C<JSON::XS::false> and C<JSON::XS::true> to improve readability. |
1018 | also use C<JSON::XS::false> and C<JSON::XS::true> to improve readability. |
1019 | |
1019 | |
1020 | encode_json [\0,JSON::XS::true] # yields [false,true] |
1020 | encode_json [\0, JSON::XS::true] # yields [false,true] |
1021 | |
1021 | |
1022 | =item JSON::XS::true, JSON::XS::false |
1022 | =item JSON::XS::true, JSON::XS::false |
1023 | |
1023 | |
1024 | These special values become JSON true and JSON false values, |
1024 | These special values become JSON true and JSON false values, |
1025 | respectively. You can also use C<\1> and C<\0> directly if you want. |
1025 | respectively. You can also use C<\1> and C<\0> directly if you want. |