… | |
… | |
103 | |
103 | |
104 | package JSON::XS; |
104 | package JSON::XS; |
105 | |
105 | |
106 | use strict; |
106 | use strict; |
107 | |
107 | |
108 | our $VERSION = '2.2'; |
108 | our $VERSION = '2.21'; |
109 | our @ISA = qw(Exporter); |
109 | our @ISA = qw(Exporter); |
110 | |
110 | |
111 | our @EXPORT = qw(encode_json decode_json to_json from_json); |
111 | our @EXPORT = qw(encode_json decode_json to_json from_json); |
112 | |
112 | |
113 | sub to_json($) { |
113 | sub to_json($) { |
… | |
… | |
763 | |
763 | |
764 | This will reset the state of the incremental parser and will remove the |
764 | This will reset the state of the incremental parser and will remove the |
765 | parsed text from the input buffer. This is useful after C<incr_parse> |
765 | parsed text from the input buffer. This is useful after C<incr_parse> |
766 | died, in which case the input buffer and incremental parser state is left |
766 | died, in which case the input buffer and incremental parser state is left |
767 | unchanged, to skip the text parsed so far and to reset the parse state. |
767 | unchanged, to skip the text parsed so far and to reset the parse state. |
|
|
768 | |
|
|
769 | =item $json->incr_reset |
|
|
770 | |
|
|
771 | This completely resets the incremental parser, that is, after this call, |
|
|
772 | it will be as if the parser had never parsed anything. |
|
|
773 | |
|
|
774 | This is useful if you want ot repeatedly parse JSON objects and want to |
|
|
775 | ignore any trailing data, which means you have to reset the parser after |
|
|
776 | each successful decode. |
768 | |
777 | |
769 | =back |
778 | =back |
770 | |
779 | |
771 | =head2 LIMITATIONS |
780 | =head2 LIMITATIONS |
772 | |
781 | |