Class JsonNodeParser.Builder

java.lang.Object
software.amazon.awssdk.protocols.jsoncore.JsonNodeParser.Builder
Enclosing class:
JsonNodeParser

public static final class JsonNodeParser.Builder extends Object
A builder for configuring and creating JsonNodeParser. Created via JsonNodeParser.builder().
  • Method Details

    • removeErrorLocations

      public JsonNodeParser.Builder removeErrorLocations(boolean removeErrorLocations)
      Whether error locations should be removed if parsing fails. This prevents the content of the JSON from appearing in error messages. This is useful when the content of the JSON may be sensitive and not want to be logged.

      By default, this is false.

    • jsonFactory

      public JsonNodeParser.Builder jsonFactory(software.amazon.awssdk.thirdparty.jackson.core.JsonFactory jsonFactory)
      The JsonFactory implementation to be used when parsing the input. This allows JSON extensions like CBOR or Ion to be supported.

      It's highly recommended us use a shared JsonFactory where possible, so they should be stored statically: http://wiki.fasterxml.com/JacksonBestPracticesPerformance

      By default, this is JsonNodeParser.DEFAULT_JSON_FACTORY.

    • jsonValueNodeFactory

      public JsonNodeParser.Builder jsonValueNodeFactory(JsonValueNodeFactory jsonValueNodeFactory)
      Factory to create JsonNode out of JSON tokens. This allows JSON variants, such as CBOR, to produce actual values instead of having to parse them out of strings.

      By default, this is JsonValueNodeFactory.DEFAULT.

    • build

      public JsonNodeParser build()
      Build a JsonNodeParser based on the current configuration of this builder.