--- JSON-XS/XS.pm 2008/03/25 16:56:09 1.95 +++ JSON-XS/XS.pm 2008/03/26 01:43:14 1.97 @@ -716,13 +716,18 @@ If the method is called in scalar context, then it will try to extract exactly I JSON object. If that is successful, it will return this -object, otherwise it will return C. This is the most common way of +object, otherwise it will return C. If there is a parse error, +this method will croak just as C would do (one can then use +C to skip the errornous part). This is the most common way of using the method. And finally, in list context, it will try to extract as many objects from the stream as it can find and return them, or the empty list otherwise. For this to work, there must be no separators between the JSON -objects or arrays, instead they must be concatenated back-to-back. +objects or arrays, instead they must be concatenated back-to-back. If +an error occurs, an exception will be raised as in the scalar context +case. Note that in this case, any previously-parsed JSON texts will be +lost. =item $lvalue_string = $json->incr_text @@ -738,6 +743,13 @@ JSON object or b) parsing multiple JSON objects separated by non-JSON text (such as commas). +=item $json->incr_skip + +This will reset the state of the incremental parser and will remove the +parsed text from the input buffer. This is useful after C +died, in which case the input buffer and incremental parser state is left +unchanged, to skip the text parsed so far and to reset the parse state. + =back =head2 LIMITATIONS