public static final class JsonWriterSettings.Builder
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
JsonWriterSettings.Builder |
binaryConverter(Converter<BsonBinary> binaryConverter)
Sets the converter from BSON Binary values to JSON.
|
JsonWriterSettings.Builder |
booleanConverter(Converter<java.lang.Boolean> booleanConverter)
Sets the converter from BSON Boolean values to JSON.
|
JsonWriterSettings |
build()
Build a JsonWriterSettings instance.
|
JsonWriterSettings.Builder |
dateTimeConverter(Converter<java.lang.Long> dateTimeConverter)
Sets the converter from BSON DateTime values to JSON.
|
JsonWriterSettings.Builder |
decimal128Converter(Converter<Decimal128> decimal128Converter)
Sets the converter from BSON Decimal128 values to JSON.
|
JsonWriterSettings.Builder |
doubleConverter(Converter<java.lang.Double> doubleConverter)
Sets the converter from BSON Double values to JSON.
|
JsonWriterSettings.Builder |
indent(boolean indent)
Sets whether indentation is enabled, which defaults to false.
|
JsonWriterSettings.Builder |
indentCharacters(java.lang.String indentCharacters)
Sets the indent character string to use when indentation is enabled, which defaults to two spaces.
|
JsonWriterSettings.Builder |
int32Converter(Converter<java.lang.Integer> int32Converter)
Sets the converter from BSON Int32 values to JSON.
|
JsonWriterSettings.Builder |
int64Converter(Converter<java.lang.Long> int64Converter)
Sets the converter from BSON Int64 values to JSON.
|
JsonWriterSettings.Builder |
javaScriptConverter(Converter<java.lang.String> javaScriptConverter)
Sets the converter from BSON JavaScript values to JSON.
|
JsonWriterSettings.Builder |
maxKeyConverter(Converter<BsonMaxKey> maxKeyConverter)
Sets the converter from BSON MaxKey values to JSON.
|
JsonWriterSettings.Builder |
maxLength(int maxLength)
Sets the maximum length of the JSON string.
|
JsonWriterSettings.Builder |
minKeyConverter(Converter<BsonMinKey> minKeyConverter)
Sets the converter from BSON MinKey values to JSON.
|
JsonWriterSettings.Builder |
newLineCharacters(java.lang.String newLineCharacters)
Sets the new line character string to use when indentation is enabled, which defaults to
System.getProperty("line.separator") . |
JsonWriterSettings.Builder |
nullConverter(Converter<BsonNull> nullConverter)
Sets the converter from BSON Null values to JSON.
|
JsonWriterSettings.Builder |
objectIdConverter(Converter<ObjectId> objectIdConverter)
Sets the converter from BSON ObjectId values to JSON.
|
JsonWriterSettings.Builder |
outputMode(JsonMode outputMode)
Sets the output mode, which defaults to
JsonMode.RELAXED . |
JsonWriterSettings.Builder |
regularExpressionConverter(Converter<BsonRegularExpression> regularExpressionConverter)
Sets the converter from BSON Regular Expression values to JSON.
|
JsonWriterSettings.Builder |
stringConverter(Converter<java.lang.String> stringConverter)
Sets the converter from BSON String values to JSON.
|
JsonWriterSettings.Builder |
symbolConverter(Converter<java.lang.String> symbolConverter)
Sets the converter from BSON Symbol values to JSON.
|
JsonWriterSettings.Builder |
timestampConverter(Converter<BsonTimestamp> timestampConverter)
Sets the converter from BSON Timestamp values to JSON.
|
JsonWriterSettings.Builder |
undefinedConverter(Converter<BsonUndefined> undefinedConverter)
Sets the converter from BSON Undefined values to JSON.
|
public JsonWriterSettings build()
public JsonWriterSettings.Builder indent(boolean indent)
indent
- whether indentation is enabledpublic JsonWriterSettings.Builder newLineCharacters(java.lang.String newLineCharacters)
System.getProperty("line.separator")
.newLineCharacters
- the non-null new line character stringpublic JsonWriterSettings.Builder indentCharacters(java.lang.String indentCharacters)
indentCharacters
- the non-null indent character stringpublic JsonWriterSettings.Builder outputMode(JsonMode outputMode)
JsonMode.RELAXED
.outputMode
- the non-null output modepublic JsonWriterSettings.Builder maxLength(int maxLength)
maxLength
- the maximum length, which must be >= 0 where 0 indicate no maximum lengthpublic JsonWriterSettings.Builder nullConverter(Converter<BsonNull> nullConverter)
nullConverter
- the converterpublic JsonWriterSettings.Builder stringConverter(Converter<java.lang.String> stringConverter)
stringConverter
- the converterpublic JsonWriterSettings.Builder dateTimeConverter(Converter<java.lang.Long> dateTimeConverter)
dateTimeConverter
- the converterpublic JsonWriterSettings.Builder binaryConverter(Converter<BsonBinary> binaryConverter)
binaryConverter
- the converterpublic JsonWriterSettings.Builder booleanConverter(Converter<java.lang.Boolean> booleanConverter)
booleanConverter
- the converterpublic JsonWriterSettings.Builder doubleConverter(Converter<java.lang.Double> doubleConverter)
doubleConverter
- the converterpublic JsonWriterSettings.Builder int32Converter(Converter<java.lang.Integer> int32Converter)
int32Converter
- the converterpublic JsonWriterSettings.Builder int64Converter(Converter<java.lang.Long> int64Converter)
int64Converter
- the converterpublic JsonWriterSettings.Builder decimal128Converter(Converter<Decimal128> decimal128Converter)
decimal128Converter
- the converterpublic JsonWriterSettings.Builder objectIdConverter(Converter<ObjectId> objectIdConverter)
objectIdConverter
- the converterpublic JsonWriterSettings.Builder timestampConverter(Converter<BsonTimestamp> timestampConverter)
timestampConverter
- the converterpublic JsonWriterSettings.Builder regularExpressionConverter(Converter<BsonRegularExpression> regularExpressionConverter)
regularExpressionConverter
- the converterpublic JsonWriterSettings.Builder symbolConverter(Converter<java.lang.String> symbolConverter)
symbolConverter
- the converterpublic JsonWriterSettings.Builder minKeyConverter(Converter<BsonMinKey> minKeyConverter)
minKeyConverter
- the converterpublic JsonWriterSettings.Builder maxKeyConverter(Converter<BsonMaxKey> maxKeyConverter)
maxKeyConverter
- the converterpublic JsonWriterSettings.Builder undefinedConverter(Converter<BsonUndefined> undefinedConverter)
undefinedConverter
- the converterpublic JsonWriterSettings.Builder javaScriptConverter(Converter<java.lang.String> javaScriptConverter)
javaScriptConverter
- the converterCopyright © 2010 - 2020 Adobe. All Rights Reserved