Class JsonParser.Builder

java.lang.Object
uk.blankaspect.common.json.JsonParser.Builder
Enclosing class:
JsonParser

public static class JsonParser.Builder extends Object
This class implements a builder for a JSON parser.
  • Method Details

    • elementFacade

      public JsonParser.Builder elementFacade(IElementFacade elementFacade)
      Sets the interface through which XML elements are created and their attributes accessed.
      Parameters:
      elementFacade - the interface through which XML elements will be created and their attributes accessed.
      Returns:
      this builder.
    • storeExcessiveIntegerAsFP

      public JsonParser.Builder storeExcessiveIntegerAsFP(boolean storeExcessiveIntegerAsFP)
      Sets or clears the flag that determines whether a JSON number that is deemed to be an integer but is too large to be stored as a signed 64-bit integer (ie, a long) will be stored as a double-precision floating-point number (ie, a double).
      Parameters:
      storeExcessiveIntegerAsFP - if true a JSON number that is deemed to be an integer but is too large for a long will be stored as a double.
      Returns:
      this builder.
    • build

      public JsonParser build()
      Creates and returns a new instance of a JSON parser that is initialised from the state of this builder.
      Returns:
      a new instance of a JSON parser.