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.95 by root, Tue Mar 25 16:56:09 2008 UTC vs.
Revision 1.96 by root, Wed Mar 26 01:40:42 2008 UTC

714return without doing anything further. This can be used to add more text 714return without doing anything further. This can be used to add more text
715in as many chunks as you want. 715in as many chunks as you want.
716 716
717If the method is called in scalar context, then it will try to extract 717If the method is called in scalar context, then it will try to extract
718exactly I<one> JSON object. If that is successful, it will return this 718exactly I<one> JSON object. If that is successful, it will return this
719object, otherwise it will return C<undef>. This is the most common way of 719object, otherwise it will return C<undef>. If there is a parse error,
720this method will croak just as C<decode> would do (one can then use
721C<incr_skip> to skip the errornous part). This is the most common way of
720using the method. 722using the method.
721 723
722And finally, in list context, it will try to extract as many objects 724And finally, in list context, it will try to extract as many objects
723from the stream as it can find and return them, or the empty list 725from the stream as it can find and return them, or the empty list
724otherwise. For this to work, there must be no separators between the JSON 726otherwise. For this to work, there must be no separators between the JSON
725objects or arrays, instead they must be concatenated back-to-back. 727objects or arrays, instead they must be concatenated back-to-back. If
728an error occurs, an exception will be raised as in the scalar context
729case. Note that in this case, any previously-parsed JSON texts will be
730lost.
731
732If there is a parse
726 733
727=item $lvalue_string = $json->incr_text 734=item $lvalue_string = $json->incr_text
728 735
729This method returns the currently stored JSON fragment as an lvalue, that 736This method returns the currently stored JSON fragment as an lvalue, that
730is, you can manipulate it. This I<only> works when a preceding call to 737is, you can manipulate it. This I<only> works when a preceding call to

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines