Home | History | Annotate | Download | only in lib

Lines Matching defs:PP

16 my $Module_PP  = 'JSON::PP';
22 # XS and PP common methods
40 /; # JSON::PP specific
58 if ($backend eq '1' or $backend =~ /JSON::XS\s*,\s*JSON::PP/) {
61 elsif ($backend eq '0' or $backend eq 'JSON::PP') {
299 local $^W; # if PP installed but invalid version, backportPP redefines methods.
306 _set_module( $JSON::Backend = $Module_PP ); # even if backportPP, set $Backend with 'JSON::PP'
307 JSON::Backend::PP->init;
378 elsif ( exists $INC{'JSON/PP.pm'} and $boolean eq 'JSON::PP::Boolean' ) {
382 *JSON::PP::true = sub { $true };
383 *JSON::PP::false = sub { $false };
391 # Helper classes for Backend Module (PP)
394 package JSON::Backend::PP;
399 *{"JSON::decode_json"} = \&{"JSON::PP::decode_json"};
400 *{"JSON::encode_json"} = \&{"JSON::PP::encode_json"};
401 *{"JSON::PP::is_xs"} = sub { 0 };
402 *{"JSON::PP::is_pp"} = sub { 1 };
489 push @{"JSON::XS::Boolean::ISA"}, qw(JSON::PP::Boolean);
490 push @{"JSON::PP::Boolean::ISA"}, qw(JSON::Boolean);
536 my $pp = JSON::PP->new;
540 $pp->$name( $prop->{$name} ? $prop->{$name} : 0 );
551 $pp->$method($enable);
554 $pp->indent_length( $_[0]->get_indent_length );
556 return $pp;
559 sub _encode { # using with PP encode
569 sub _decode { # if unsupported-flag is set, use PP
579 sub decode_prefix { # if unsupported-flag is set, use PP
642 # If you want to use PP only support features, call with '-support_by_pp'
643 # When XS unsupported feature is enable, using PP (de|en)code instead of XS ones.
665 JSON::PP was earlier included in the C<JSON> distribution, but
667 L<JSON::PP> was removed from the JSON distribution and can now
676 (The newest JSON::PP version still exists in CPAN.)
695 L<JSON::XS> or L<JSON::PP>.
699 JSON::PP is a pure-Perl module which is bundled in this distribution and
702 This module try to use JSON::XS by default and fail to it, use JSON::PP instead.
703 So its features completely depend on JSON::XS or JSON::PP.
727 C<JSON> should call JSON::PP as the backend which can be used since Perl 5.005.
729 With Perl 5.8.x JSON::PP works, but from 5.8.0 to 5.8.2, because of a Perl side problem,
730 JSON::PP works slower in the versions. And in 5.005, the Unicode handling is not available.
731 See to L<JSON::PP/UNICODE HANDLING ON PERLS> for more information.
752 See to L<JSON::XS/FEATURES> and L<JSON::PP/FEATURES>.
760 If not available, C<JSON> returns a JSON::PP object instead of JSON::XS and
968 Returns a new C<JSON> object inherited from either JSON::XS or JSON::PP
994 See to L<JSON::PP/UNICODE HANDLING ON PERLS> if the backend is PP.
1043 See to L<JSON::PP/UNICODE HANDLING ON PERLS> if the backend is PP.
1077 With JSON::PP, you can also access C<indent_length> to change indent space length.
1393 With JSON::PP, it is noop about resizing strings but tries
1396 See to L<JSON::XS/OBJECT-ORIENTED INTERFACE> and L<JSON::PP/METHODS>.
1421 With JSON::PP as the backend, when a large value (100 or more) was set and
1614 =head1 JSON::PP SUPPORT METHODS
1616 The below methods are JSON::PP own methods, so when C<JSON> works
1617 with JSON::PP (i.e. the created object is a JSON::PP object), available.
1618 See to L<JSON::PP/JSON::PP OWN METHODS> in detail.
1621 are available even with JSON::XS. See to L<USE PP FEATURES EVEN THOUGH XS BACKEND>.
1697 See to L<JSON::PP/JSON::PP OWN METHODS>.
1713 With JSON::PP, it sets the indent space length with the given $length.
1723 $js = $pc->sort_by(sub { $JSON::PP::a cmp $JSON::PP::b })->encode($obj);
1729 sub JSON::PP::own_sort { $JSON::PP::a cmp $JSON::PP::b }
1731 As the sorting routine runs in the JSON::PP scope, the given
1733 with 'JSON::PP::'.
1737 See to L<JSON::PP/JSON::PP OWN METHODS>.
1742 JSON::XS and JSON::PP mapping mechanisms are almost equivalent.
1790 If the backend is JSON::PP and C<allow_bignum> is enable, the big integers
1845 In future, the ordered object feature will be added to JSON::PP using C<tie> mechanism.
1888 difficult objects to encode: JSON::XS and JSON::PP will encode undefined scalars as
1928 If the backend is JSON::PP and C<allow_bignum> is enable,
1948 C<uses> JSON::PP. The required JSON::XS version is I<2.2> or later.
1951 and JSON::XS object is a blessed scalar reference while JSON::PP is a blessed hash
1957 my $json = JSON->new; # XS or PP?
1962 JSON->backend; # 'JSON::XS' or 'JSON::PP'
1977 =item PERL_JSON_BACKEND = 0 or PERL_JSON_BACKEND = 'JSON::PP'
1979 Always use JSON::PP
1981 =item PERL_JSON_BACKEND == 1 or PERL_JSON_BACKEND = 'JSON::XS,JSON::PP'
1984 otherwise use JSON::PP.
1993 JSON::backportPP is JSON::PP back port module.
1994 C<JSON> includes JSON::backportPP instead of JSON::PP.
2002 BEGIN { $ENV{PERL_JSON_BACKEND} = 'JSON::PP' }
2003 use JSON; # always uses JSON::PP
2007 =head1 USE PP FEATURES EVEN THOUGH XS BACKEND
2009 Many methods are available with either JSON::XS or JSON::PP and
2010 when the backend module is JSON::XS, if any JSON::PP specific (i.e. JSON::XS unsupported)
2015 This feature is achieved by using JSON::PP in C<de/encode>.
2033 See to L<JSON::PP SUPPORT METHODS>.
2061 Now C<JSON> bundles with JSON::PP which can handle JSON more properly than them.
2074 C<JSON> makes L<JSON::XS::Boolean> and L<JSON::PP::Boolean> is-a relation
2079 C<JSON::Number> is now needless because JSON::XS and JSON::PP have
2157 (Only with JSON::PP, if C<-support_by_pp> is not used.)
2163 (Only with JSON::PP, if C<-support_by_pp> is not used.)
2173 (Only with JSON::PP, if C<-support_by_pp> is not used.)
2189 (Only with JSON::PP, even if C<-support_by_pp> is used currently.)
2193 $json->sort_by(sub { $JSON::PP::a <=> $JSON::PP::b })->encode($perl_scalar)
2195 Can't access C<$a> and C<$b> but C<$JSON::PP::a> and C<$JSON::PP::b>.
2207 Needless because C<JSON> (JSON::XS/JSON::PP) sets
2259 No test with JSON::PP. If with JSON::XS, See to L<JSON::XS/THREADS>.
2271 L<JSON::XS>, L<JSON::PP>