ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/JSON-XS/XS.pm
(Generate patch)

Comparing JSON-XS/XS.pm (file contents):
Revision 1.142 by root, Fri Oct 25 19:57:42 2013 UTC vs.
Revision 1.143 by root, Fri Oct 25 20:02:54 2013 UTC

673when there is trailing garbage after the first JSON object, it will 673when there is trailing garbage after the first JSON object, it will
674silently stop parsing there and return the number of characters consumed 674silently stop parsing there and return the number of characters consumed
675so far. 675so far.
676 676
677This is useful if your JSON texts are not delimited by an outer protocol 677This is useful if your JSON texts are not delimited by an outer protocol
678(which is not the brightest thing to do in the first place) and you need
679to know where the JSON text ends. 678and you need to know where the JSON text ends.
680 679
681 JSON::XS->new->decode_prefix ("[1] the tail") 680 JSON::XS->new->decode_prefix ("[1] the tail")
682 => ([], 3) 681 => ([], 3)
683 682
684=back 683=back
778=back 777=back
779 778
780=head2 LIMITATIONS 779=head2 LIMITATIONS
781 780
782All options that affect decoding are supported, except 781All options that affect decoding are supported, except
783C<allow_nonref>. The reason for this is that it cannot be made to 782C<allow_nonref>. The reason for this is that it cannot be made to work
784work sensibly: JSON objects and arrays are self-delimited, i.e. you can concatenate 783sensibly: JSON objects and arrays are self-delimited, i.e. you can
785them back to back and still decode them perfectly. This does not hold true 784concatenate them back to back and still decode them perfectly. This does
786for JSON numbers, however. 785not hold true for JSON numbers, however.
787 786
788For example, is the string C<1> a single JSON number, or is it simply the 787For example, is the string C<1> a single JSON number, or is it simply the
789start of C<12>? Or is C<12> a single JSON number, or the concatenation 788start of C<12>? Or is C<12> a single JSON number, or the concatenation
790of C<1> and C<2>? In neither case you can tell, and this is why JSON::XS 789of C<1> and C<2>? In neither case you can tell, and this is why JSON::XS
791takes the conservative route and disallows this case. 790takes the conservative route and disallows this case.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines