I hope others have something, but for now examples from `jackson-core`
tests may have to suffice.
Or, anything that describes how `aalto-xml` non-blocking mode works
should be highly applicable.
In nutshell, the only differences are:
1. You must construct non-blocking parser with new method
`createNonBlockingByteArrayParser()` -- it does NOT take input source
2. To feed input, you call method `getNonBlockingInputFeeder()` of
non-blocking parser from step (1)
3. All reading is exactly using normal `JsonParser` methods, but
`nextToken()` will return `NOT_AVAILABLE` if there isn't enough input
for more tokens yet (but input source is not closed yet)
4. You should only feed more input:
(a) First time right after constructing parser (no input buffered)
(b) Once parser returns `NOT_AVAILABLE`, to indicate it has
consumed input fed so far
(c) After all input has been fed, and parser has consumed all
input, `endOfInput()` should be called to indicate end-of-input
I hope this helps,
-+ Tatu +-
ps. I hope to find time and inspiration to write blog post or two
about non-blocking parser; but I would be especially happy if someone
else writes one and sends a link -- I will link all articles from
jackson portal page
> --
> You received this message because you are subscribed to the Google Groups
> "jackson-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
jackson-user...@googlegroups.com.
> To post to this group, send email to
jackso...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.