Flip the parser to emit a stream of events for each new json array.
Flip the parser to emit a single value event for each new json array.
Json array currently streamed won't be affected.End the stream, this must be called after all the json stream has been processed.
Something has happened, so handle it.
Flip the parser to emit a stream of events for each new json object.
Flip the parser to emit a single value event for each new json object.
Json object currently streamed won't be affected.Pipe this ReadStream
to the WriteStream
.
Elements emitted by this stream will be written to the write stream until this stream ends or fails.
Once this stream has ended or failed, the write stream will be ended and the handler
will be
called with the result.
Pipe this ReadStream
to the WriteStream
.
Elements emitted by this stream will be written to the write stream until this stream ends or fails.
Once this stream has ended or failed, the write stream will be ended and the handler
will be
called with the result.
Handle a Buffer
, pretty much like calling {@link Handler#handle}.
Create a new JsonParser
instance.
Create a new JsonParser
instance.
Generated using TypeDoc
A parser class which allows to incrementally parse json elements and emit json parse events instead of parsing a json element fully. This parser is convenient for parsing large json structures.
The parser also parses concatenated json streams or line delimited json streams. The parser can also parse entire object or array when it is convenient, for instance a very large array of small objects can be parsed efficiently by handling array start/end and object events. Whenever the parser fails to parse or process the stream, the {@link JsonParser#exceptionHandler} is called with the cause of the failure and the current handling stops. After such event, the parser should not handle data anymore.