Class JsonParser

  • All Implemented Interfaces:
    io.vertx.core.Handler<Buffer>, ReadStream<JsonEvent>, StreamBase, Consumer<Buffer>

    public class JsonParser
    extends Object
    implements ReadStream<JsonEvent>, io.vertx.core.Handler<Buffer>, Consumer<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 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(java.util.function.Consumer<java.lang.Throwable>) 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 original non Mutiny-ified interface using Vert.x codegen.