Class JsonNodeParser.Builder
java.lang.Object
software.amazon.awssdk.protocols.jsoncore.JsonNodeParser.Builder
- Enclosing class:
JsonNodeParser
A builder for configuring and creating
JsonNodeParser
. Created via JsonNodeParser.builder()
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build aJsonNodeParser
based on the current configuration of this builder.jsonFactory
(software.amazon.awssdk.thirdparty.jackson.core.JsonFactory jsonFactory) TheJsonFactory
implementation to be used when parsing the input.jsonValueNodeFactory
(JsonValueNodeFactory jsonValueNodeFactory) Factory to create JsonNode out of JSON tokens.removeErrorLocations
(boolean removeErrorLocations) Whether error locations should be removed if parsing fails.
-
Method Details
-
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) TheJsonFactory
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/JacksonBestPracticesPerformanceBy default, this is
JsonNodeParser.DEFAULT_JSON_FACTORY
. -
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
Build aJsonNodeParser
based on the current configuration of this builder.
-