public static final class JsonWriterSettings.Builder extends Object
Modifier and Type | Method | Description |
---|---|---|
JsonWriterSettings.Builder |
binaryConverter(Converter<BsonBinary> binaryConverter) |
Sets the converter from BSON Binary values to JSON.
|
JsonWriterSettings.Builder |
booleanConverter(Converter<Boolean> booleanConverter) |
Sets the converter from BSON Boolean values to JSON.
|
JsonWriterSettings |
build() |
Build a JsonWriterSettings instance.
|
JsonWriterSettings.Builder |
dateTimeConverter(Converter<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<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(String indentCharacters) |
Sets the indent character string to use when indentation is enabled, which defaults to two spaces.
|
JsonWriterSettings.Builder |
int32Converter(Converter<Integer> int32Converter) |
Sets the converter from BSON Int32 values to JSON.
|
JsonWriterSettings.Builder |
int64Converter(Converter<Long> int64Converter) |
Sets the converter from BSON Int64 values to JSON.
|
JsonWriterSettings.Builder |
javaScriptConverter(Converter<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(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<String> stringConverter) |
Sets the converter from BSON String values to JSON.
|
JsonWriterSettings.Builder |
symbolConverter(Converter<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(String newLineCharacters)
System.getProperty("line.separator")
.newLineCharacters
- the non-null new line character stringpublic JsonWriterSettings.Builder indentCharacters(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<String> stringConverter)
stringConverter
- the converterpublic JsonWriterSettings.Builder dateTimeConverter(Converter<Long> dateTimeConverter)
dateTimeConverter
- the converterpublic JsonWriterSettings.Builder binaryConverter(Converter<BsonBinary> binaryConverter)
binaryConverter
- the converterpublic JsonWriterSettings.Builder booleanConverter(Converter<Boolean> booleanConverter)
booleanConverter
- the converterpublic JsonWriterSettings.Builder doubleConverter(Converter<Double> doubleConverter)
doubleConverter
- the converterpublic JsonWriterSettings.Builder int32Converter(Converter<Integer> int32Converter)
int32Converter
- the converterpublic JsonWriterSettings.Builder int64Converter(Converter<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<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<String> javaScriptConverter)
javaScriptConverter
- the converter