Class JsonStreamParser.Builder

java.lang.Object
com.couchbase.client.core.json.stream.JsonStreamParser.Builder
Enclosing class:
JsonStreamParser

public static final class JsonStreamParser.Builder extends Object
Builder instances are reusable provided that ALL configuration of the instance occurs before any call to build().

Not thread safe.

  • Method Details

    • doOnValue

      public JsonStreamParser.Builder doOnValue(String jsonPointer, Consumer<MatchedValue> callback)
      Register a callback to invoke when the target of the JSON pointer is found.

      The JSON pointer path component "-" (which normally refers to the non-existent array element after the end) is interpreted as a wildcard that matches every element.

    • build

      public JsonStreamParser build()
      Return a new parser using the builder's configuration. May be called repeatedly to get fresh parsers with the same configuration.