Package org.bson.json
Class JsonWriterSettings.Builder
- java.lang.Object
-
- org.bson.json.JsonWriterSettings.Builder
-
- Enclosing class:
- JsonWriterSettings
@Deprecated(since="2022-10-31") public static final class JsonWriterSettings.Builder extends java.lang.ObjectDeprecated.Usage of this API is not supported in AEM as a Cloud Service.A builder for JsonWriterSettings- Since:
- 3.5
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description JsonWriterSettings.BuilderbinaryConverter(Converter<BsonBinary> binaryConverter)Deprecated.Sets the converter from BSON Binary values to JSON.JsonWriterSettings.BuilderbooleanConverter(Converter<java.lang.Boolean> booleanConverter)Deprecated.Sets the converter from BSON Boolean values to JSON.JsonWriterSettingsbuild()Deprecated.Build a JsonWriterSettings instance.JsonWriterSettings.BuilderdateTimeConverter(Converter<java.lang.Long> dateTimeConverter)Deprecated.Sets the converter from BSON DateTime values to JSON.JsonWriterSettings.Builderdecimal128Converter(Converter<Decimal128> decimal128Converter)Deprecated.Sets the converter from BSON Decimal128 values to JSON.JsonWriterSettings.BuilderdoubleConverter(Converter<java.lang.Double> doubleConverter)Deprecated.Sets the converter from BSON Double values to JSON.JsonWriterSettings.Builderindent(boolean indent)Deprecated.Sets whether indentation is enabled, which defaults to false.JsonWriterSettings.BuilderindentCharacters(java.lang.String indentCharacters)Deprecated.Sets the indent character string to use when indentation is enabled, which defaults to two spaces.JsonWriterSettings.Builderint32Converter(Converter<java.lang.Integer> int32Converter)Deprecated.Sets the converter from BSON Int32 values to JSON.JsonWriterSettings.Builderint64Converter(Converter<java.lang.Long> int64Converter)Deprecated.Sets the converter from BSON Int64 values to JSON.JsonWriterSettings.BuilderjavaScriptConverter(Converter<java.lang.String> javaScriptConverter)Deprecated.Sets the converter from BSON JavaScript values to JSON.JsonWriterSettings.BuildermaxKeyConverter(Converter<BsonMaxKey> maxKeyConverter)Deprecated.Sets the converter from BSON MaxKey values to JSON.JsonWriterSettings.BuildermaxLength(int maxLength)Deprecated.Sets the maximum length of the JSON string.JsonWriterSettings.BuilderminKeyConverter(Converter<BsonMinKey> minKeyConverter)Deprecated.Sets the converter from BSON MinKey values to JSON.JsonWriterSettings.BuildernewLineCharacters(java.lang.String newLineCharacters)Deprecated.Sets the new line character string to use when indentation is enabled, which defaults toSystem.getProperty("line.separator").JsonWriterSettings.BuildernullConverter(Converter<BsonNull> nullConverter)Deprecated.Sets the converter from BSON Null values to JSON.JsonWriterSettings.BuilderobjectIdConverter(Converter<ObjectId> objectIdConverter)Deprecated.Sets the converter from BSON ObjectId values to JSON.JsonWriterSettings.BuilderoutputMode(JsonMode outputMode)Deprecated.Sets the output mode, which defaults toJsonMode.RELAXED.JsonWriterSettings.BuilderregularExpressionConverter(Converter<BsonRegularExpression> regularExpressionConverter)Deprecated.Sets the converter from BSON Regular Expression values to JSON.JsonWriterSettings.BuilderstringConverter(Converter<java.lang.String> stringConverter)Deprecated.Sets the converter from BSON String values to JSON.JsonWriterSettings.BuildersymbolConverter(Converter<java.lang.String> symbolConverter)Deprecated.Sets the converter from BSON Symbol values to JSON.JsonWriterSettings.BuildertimestampConverter(Converter<BsonTimestamp> timestampConverter)Deprecated.Sets the converter from BSON Timestamp values to JSON.JsonWriterSettings.BuilderundefinedConverter(Converter<BsonUndefined> undefinedConverter)Deprecated.Sets the converter from BSON Undefined values to JSON.
-
-
-
Method Detail
-
build
public JsonWriterSettings build()
Deprecated.Build a JsonWriterSettings instance.- Returns:
- a JsonWriterSettings instance
-
indent
public JsonWriterSettings.Builder indent(boolean indent)
Deprecated.Sets whether indentation is enabled, which defaults to false.- Parameters:
indent- whether indentation is enabled- Returns:
- this
-
newLineCharacters
public JsonWriterSettings.Builder newLineCharacters(java.lang.String newLineCharacters)
Deprecated.Sets the new line character string to use when indentation is enabled, which defaults toSystem.getProperty("line.separator").- Parameters:
newLineCharacters- the non-null new line character string- Returns:
- this
-
indentCharacters
public JsonWriterSettings.Builder indentCharacters(java.lang.String indentCharacters)
Deprecated.Sets the indent character string to use when indentation is enabled, which defaults to two spaces.- Parameters:
indentCharacters- the non-null indent character string- Returns:
- this
-
outputMode
public JsonWriterSettings.Builder outputMode(JsonMode outputMode)
Deprecated.Sets the output mode, which defaults toJsonMode.RELAXED.- Parameters:
outputMode- the non-null output mode- Returns:
- this
-
maxLength
public JsonWriterSettings.Builder maxLength(int maxLength)
Deprecated.Sets the maximum length of the JSON string. The string will be truncated at this length.- Parameters:
maxLength- the maximum length, which must be >= 0 where 0 indicate no maximum length- Returns:
- the maximum length of the JSON string
- Since:
- 3.7
-
nullConverter
public JsonWriterSettings.Builder nullConverter(Converter<BsonNull> nullConverter)
Deprecated.Sets the converter from BSON Null values to JSON.- Parameters:
nullConverter- the converter- Returns:
- this
-
stringConverter
public JsonWriterSettings.Builder stringConverter(Converter<java.lang.String> stringConverter)
Deprecated.Sets the converter from BSON String values to JSON.- Parameters:
stringConverter- the converter- Returns:
- this
-
dateTimeConverter
public JsonWriterSettings.Builder dateTimeConverter(Converter<java.lang.Long> dateTimeConverter)
Deprecated.Sets the converter from BSON DateTime values to JSON.- Parameters:
dateTimeConverter- the converter- Returns:
- this
-
binaryConverter
public JsonWriterSettings.Builder binaryConverter(Converter<BsonBinary> binaryConverter)
Deprecated.Sets the converter from BSON Binary values to JSON.- Parameters:
binaryConverter- the converter- Returns:
- this
-
booleanConverter
public JsonWriterSettings.Builder booleanConverter(Converter<java.lang.Boolean> booleanConverter)
Deprecated.Sets the converter from BSON Boolean values to JSON.- Parameters:
booleanConverter- the converter- Returns:
- this
-
doubleConverter
public JsonWriterSettings.Builder doubleConverter(Converter<java.lang.Double> doubleConverter)
Deprecated.Sets the converter from BSON Double values to JSON.- Parameters:
doubleConverter- the converter- Returns:
- this
-
int32Converter
public JsonWriterSettings.Builder int32Converter(Converter<java.lang.Integer> int32Converter)
Deprecated.Sets the converter from BSON Int32 values to JSON.- Parameters:
int32Converter- the converter- Returns:
- this
-
int64Converter
public JsonWriterSettings.Builder int64Converter(Converter<java.lang.Long> int64Converter)
Deprecated.Sets the converter from BSON Int64 values to JSON.- Parameters:
int64Converter- the converter- Returns:
- this
-
decimal128Converter
public JsonWriterSettings.Builder decimal128Converter(Converter<Decimal128> decimal128Converter)
Deprecated.Sets the converter from BSON Decimal128 values to JSON.- Parameters:
decimal128Converter- the converter- Returns:
- this
-
objectIdConverter
public JsonWriterSettings.Builder objectIdConverter(Converter<ObjectId> objectIdConverter)
Deprecated.Sets the converter from BSON ObjectId values to JSON.- Parameters:
objectIdConverter- the converter- Returns:
- this
-
timestampConverter
public JsonWriterSettings.Builder timestampConverter(Converter<BsonTimestamp> timestampConverter)
Deprecated.Sets the converter from BSON Timestamp values to JSON.- Parameters:
timestampConverter- the converter- Returns:
- this
-
regularExpressionConverter
public JsonWriterSettings.Builder regularExpressionConverter(Converter<BsonRegularExpression> regularExpressionConverter)
Deprecated.Sets the converter from BSON Regular Expression values to JSON.- Parameters:
regularExpressionConverter- the converter- Returns:
- this
-
symbolConverter
public JsonWriterSettings.Builder symbolConverter(Converter<java.lang.String> symbolConverter)
Deprecated.Sets the converter from BSON Symbol values to JSON.- Parameters:
symbolConverter- the converter- Returns:
- this
-
minKeyConverter
public JsonWriterSettings.Builder minKeyConverter(Converter<BsonMinKey> minKeyConverter)
Deprecated.Sets the converter from BSON MinKey values to JSON.- Parameters:
minKeyConverter- the converter- Returns:
- this
-
maxKeyConverter
public JsonWriterSettings.Builder maxKeyConverter(Converter<BsonMaxKey> maxKeyConverter)
Deprecated.Sets the converter from BSON MaxKey values to JSON.- Parameters:
maxKeyConverter- the converter- Returns:
- this
-
undefinedConverter
public JsonWriterSettings.Builder undefinedConverter(Converter<BsonUndefined> undefinedConverter)
Deprecated.Sets the converter from BSON Undefined values to JSON.- Parameters:
undefinedConverter- the converter- Returns:
- this
-
javaScriptConverter
public JsonWriterSettings.Builder javaScriptConverter(Converter<java.lang.String> javaScriptConverter)
Deprecated.Sets the converter from BSON JavaScript values to JSON.- Parameters:
javaScriptConverter- the converter- Returns:
- this
-
-