• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/CPANInternal-159.1/JSON-PP-2.27203/lib/JSON/

Lines Matching +refs:format +refs:decode

109 sub decode_json { # decode
110 ($JSON ||= __PACKAGE__->new->utf8)->decode(@_);
147 sub decode {
367 if ( OLD_PERL ) { utf8::decode($k) } # key for Perl 5.6 / be optimized
669 sprintf("attempted decode of JSON text of %s bytes size, but max_size is set to %s"
752 utf8::decode($s) if($is_utf8);
1452 utf8::decode( $self->{incr_text} ) ;
1621 $perl_scalar = $json->decode( $json_text );
1706 $perl_scalar = JSON::PP->new->utf8->decode($json_text)
1745 my $perl_scalar = $json->decode( $json_text );
1753 If an outer data is not encoded in UTF-8, firstly you should C<decode> it.
1759 my $unicode_json_text = decode( $encoding, <$fh> ); # UNICODE
1770 $perl_scalar = $json->utf8(0)->decode( $unicode_json_text );
1799 Or C<decode $encoding> all string values and C<encode_json>:
1801 $perl_scalar->{ foo } = decode( $encoding, $perl_scalar->{ foo } );
1844 required by the JSON syntax or other flags. This results in a faster and more compact format.
1873 into UTF-8, as required by many protocols, while the decode method expects to be handled
1884 Unicode string, while decode expects thus a Unicode string. Any decoding or encoding
1892 Example, decode UTF-32LE-encoded JSON:
1895 $object = JSON::PP->new->decode (decode "UTF-32LE", $jsontext);
1963 If C<$enable> is true (or missing), then C<decode> will accept some
1970 If C<$enable> is false (the default), then C<decode> will only accept
2037 which is an extension to RFC4627. Likewise, C<decode> will accept those JSON
2042 or array. Likewise, C<decode> will croak if given something that is not a
2063 This option does not affect "decode" in any way, and it is
2078 encoded. Has no effect on C<decode>.
2104 This setting does not yet influence C<decode> in any way.
2113 When C<$coderef> is specified, it will be called from C<decode> each
2123 be removed and C<decode> will not change the deserialised hash in any
2130 $js->decode ('[{}]'); # the given subroutine takes a hash reference.
2133 $js->decode ('{"a":1, "b":2}');
2165 Example, decode JSON objects of the form C<< { "__widget__" => <id> } >>
2174 ->decode ('{"__widget__": 5')
2196 C<encode> or C<decode> to their minimum size possible.
2236 being attempted. The default is C<0>, meaning no limit. When C<decode>
2238 attempt to decode the string but throw an exception. This setting has no
2257 =head2 decode
2259 $perl_scalar = $json->decode($json_text)
2273 This works like the C<decode> method, but instead of raising an exception
2288 it then can decode. This process is similar to using C<decode_prefix>
2325 this method will croak just as C<decode> would do (one can then use
2384 each successful decode.
2395 If C<$enable> is true (or missing), then C<decode> will accept
2397 format.
2399 $json->allow_singlequote->decode({"foo":'bar'});
2400 $json->allow_singlequote->decode({'foo':"bar"});
2401 $json->allow_singlequote->decode({'foo':'bar'});
2411 If C<$enable> is true (or missing), then C<decode> will accept
2412 bare keys of JSON object that are invalid JSON format.
2417 $json->allow_barekey->decode('{foo:"bar"}');
2423 If C<$enable> is true (or missing), then C<decode> will convert
2431 $bigfloat = $json->decode('2.000000000000000000000000001');
2442 and the module doesn't allow to C<decode> to these (except for \x2f).
2443 If C<$enable> is true (or missing), then C<decode> will accept these
2446 $json->loose->decode(qq|["abc
2719 $json->allow_nonref->decode('"\u3042"');
2720 $json->allow_nonref->decode('"\ud808\udf45"');
2750 $json->decode('"\u00e3\u0081\u0082"');
2758 $json->decode('"\u3042"');
2763 $json->decode('"\ud808\udf45"');