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 exceptionHandler(Handler) is called with
the cause of the failure and the current handling stops. After such event, the parser should not handle data
anymore.
| Modifier and Type | Method and Description |
|---|---|
| public JsonParser | Returns: a reference to this, so the API can be used fluentlyFlip the parser to emit a stream of events for each new json array. |
| public JsonParser | Returns: a reference to this, so the API can be used fluentlyFlip the parser to emit a single value event for each new json array. |
| public void | |
| public JsonParser | |
| public JsonParser | |
| public JsonParser | fetch(long amount)
Redeclares io. Fetch the specified |
| public JsonParser | |
| public static JsonParser | |
| public static JsonParser | |
| public JsonParser | Returns: a reference to this, so the API can be used fluentlyFlip the parser to emit a stream of events for each new json object. |
| public JsonParser | Returns: a reference to this, so the API can be used fluentlyFlip the parser to emit a single value event for each new json object. |
| public JsonParser | pause()
Redeclares io. Pause the |
| public JsonParser | resume()
Redeclares io. Resume reading, and sets the buffer in |
| public JsonParser | Returns: a reference to this, so the API can be used fluently
References Deprecated
Buffer is deprecated or references (maybe indirectly) at least one deprecated element.
Handle a |
| arrayEventMode | back to summary |
|---|---|
| public JsonParser arrayEventMode() Flip the parser to emit a stream of events for each new json array.
| |
| arrayValueMode | back to summary |
|---|---|
| public JsonParser arrayValueMode() Flip the parser to emit a single value event for each new json array. Json array currently streamed won't be affected.
| |
| end | back to summary |
|---|---|
| public void end() End the stream, this must be called after all the json stream has been processed. | |
| endHandler | back to summary |
|---|---|
public JsonParser endHandler(Handler<Void> endHandler)
| |
| exceptionHandler | back to summary |
|---|---|
public JsonParser exceptionHandler(Handler<Throwable> handler)
| |
| fetch | back to summary |
|---|---|
| public JsonParser fetch(long amount) Redeclares io. Doc from io. Fetch the specified
| |
| handler | back to summary |
|---|---|
public JsonParser handler(Handler<JsonEvent> handler)
| |
| newParser | back to summary |
|---|---|
| public static JsonParser newParser() Create a new | |
| newParser | back to summary |
|---|---|
| public static JsonParser newParser(ReadStream<Buffer> stream) Create a new | |
| objectEventMode | back to summary |
|---|---|
| public JsonParser objectEventMode() Flip the parser to emit a stream of events for each new json object.
| |
| objectValueMode | back to summary |
|---|---|
| public JsonParser objectValueMode() Flip the parser to emit a single value event for each new json object. Json object currently streamed won't be affected.
| |
| pause | back to summary |
|---|---|
| public JsonParser pause() Redeclares io. Doc from io. Pause the
While it's paused, no data will be sent to the data
| |
| resume | back to summary |
|---|---|
| public JsonParser resume() Redeclares io. Doc from io. Resume reading, and sets the buffer in
If the
| |
| write | back to summary |
|---|---|
| public JsonParser write(Buffer buffer)
References Deprecated
See corresponding docs for further information. Handle a
| |