Class JsonWriter.Builder
- java.lang.Object
-
- software.amazon.awssdk.protocols.jsoncore.JsonWriter.Builder
-
- Enclosing class:
- JsonWriter
public static final class JsonWriter.Builder extends Object
A builder for configuring and creatingJsonWriter. Created viaJsonWriter.builder().
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonWriterbuild()Build aJsonNodeParserbased on the current configuration of this builder.JsonWriter.BuilderjsonFactory(software.amazon.awssdk.thirdparty.jackson.core.JsonFactory jsonFactory)TheJsonFactoryimplementation to be used when parsing the input.JsonWriter.BuilderjsonGeneratorFactory(JsonWriter.JsonGeneratorFactory jsonGeneratorFactory)A factory forJsonGenerators based on anOutputStream.
-
-
-
Method Detail
-
jsonFactory
public JsonWriter.Builder jsonFactory(software.amazon.awssdk.thirdparty.jackson.core.JsonFactory jsonFactory)
TheJsonFactoryimplementation to be used when parsing the input. This allows JSON extensions like CBOR or Ion to be supported.It's highly recommended to use a shared
JsonFactorywhere possible, so they should be stored statically: http://wiki.fasterxml.com/JacksonBestPracticesPerformanceBy default, this is
JsonNodeParser.DEFAULT_JSON_FACTORY.Setting this value will also override any values set via
jsonGeneratorFactory.
-
jsonGeneratorFactory
public JsonWriter.Builder jsonGeneratorFactory(JsonWriter.JsonGeneratorFactory jsonGeneratorFactory)
A factory forJsonGenerators based on anOutputStream. This allows custom JSON generator configuration, like pretty-printing output.It's highly recommended to use a shared
JsonFactorywithin this generator factory, where possible, so they should be stored statically: http://wiki.fasterxml.com/JacksonBestPracticesPerformanceBy default, this delegates to
JsonNodeParser.DEFAULT_JSON_FACTORYto create the generator.Setting this value will also override any values set via
jsonFactory(software.amazon.awssdk.thirdparty.jackson.core.JsonFactory).
-
build
public JsonWriter build()
Build aJsonNodeParserbased on the current configuration of this builder.
-
-