vertx / io.vertx.rxjava.core.parsetools / JsonParser

# JsonParser

`open class JsonParser : ReadStream<JsonEvent>, Handler<Buffer>`

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 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 `io.vertx.rxjava.core.parsetools.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. NOTE: This class has been automatically generated from the io.vertx.core.parsetools.JsonParser non RX-ified interface using Vert.x codegen.

### Constructors

<init> | `JsonParser(delegate: JsonParser)`

### Properties

__TYPE_ARG | `static val __TYPE_ARG: TypeArg<JsonParser>`

### Functions

arrayEventMode | `open fun arrayEventMode(): JsonParser` Flip the parser to emit a stream of events for each new json array.
arrayValueMode | `open fun arrayValueMode(): JsonParser` Flip the parser to emit a single value event for each new json array. Json array currently streamed won't be affected.
end | `open fun end(): Unit` End the stream, this must be called after all the json stream has been processed.
endHandler | `open fun endHandler(endHandler: Handler<Void>): JsonParser`
equals | `open fun equals(other: Any?): Boolean`
exceptionHandler | `open fun exceptionHandler(handler: Handler<Throwable>): JsonParser`
getDelegate | `open fun getDelegate(): JsonParser`
handle | `open fun handle(event: Buffer): Unit` Something has happened, so handle it.
handler | `open fun handler(handler: Handler<JsonEvent>): JsonParser`
hashCode | `open fun hashCode(): Int`
newInstance | `open static fun newInstance(arg: JsonParser): JsonParser`
newParser | `open static fun newParser(): JsonParser` `open static fun newParser(stream: ReadStream<Buffer>): JsonParser` `open static fun newParser(stream: Observable<Buffer>): JsonParser` Create a new `JsonParser` instance.
objectEventMode | `open fun objectEventMode(): JsonParser` Flip the parser to emit a stream of events for each new json object.
objectValueMode | `open fun objectValueMode(): JsonParser` Flip the parser to emit a single value event for each new json object. Json object currently streamed won't be affected.
pause | `open fun pause(): JsonParser`
resume | `open fun resume(): JsonParser`
toObservable | `open fun toObservable(): Observable<JsonEvent>`
toString | `open fun toString(): String`
write | `open fun write(buffer: Buffer): JsonParser` Handle a `Buffer`, pretty much like calling io.vertx.rxjava.core.Handler#handle.