Package org.bson.json
Class JsonWriterSettings
java.lang.Object
org.bson.BsonWriterSettings
org.bson.json.JsonWriterSettings
Settings to control the behavior of a 
JSONWriter instance.- Since:
- 3.0
- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic final classA builder for JsonWriterSettings
- 
Method SummaryModifier and TypeMethodDescriptionstatic JsonWriterSettings.Builderbuilder()Create a builder for JsonWriterSettings, which are immutable.A converter from BSON Binary values to JSON.A converter from BSON Boolean values to JSON.A converter from BSON DateTime values to JSON.A converter from BSON Decimal128 values to JSON.A converter from BSON Double values to JSON.The indent characters to use if indent mode is enabled.A converter from BSON Int32 values to JSON.A converter from BSON Int64 values to JSON.A converter from BSON JavaScript values to JSON.A converter from BSON MaxKey values to JSON.intThe maximum length of the JSON string.A converter from BSON MinKey values to JSON.The new line character(s) to use if indent mode is enabled.A converter from BSON Null values to JSON.A converter from BSON ObjectId values to JSON.The output mode to use.A converter from BSON RegularExpression values to JSON.A converter from BSON String values to JSON.A converter from BSON Symbol values to JSON.A converter from BSON Timestamp values to JSON.A converter from BSON Undefined values to JSON.booleanisIndent()The indentation mode.Methods inherited from class org.bson.BsonWriterSettingsgetMaxSerializationDepth
- 
Method Details- 
builderCreate a builder for JsonWriterSettings, which are immutable.Defaults to JsonMode.RELAXED- Returns:
- a Builder instance
- Since:
- 3.5
 
- 
isIndentpublic boolean isIndent()The indentation mode. If true, output will be indented. Otherwise, it will all be on the same line. The default value isfalse.- Returns:
- whether output should be indented.
 
- 
getNewLineCharactersThe new line character(s) to use if indent mode is enabled. The default value isSystem.getProperty("line.separator").- Returns:
- the new line character(s) to use.
 
- 
getIndentCharactersThe indent characters to use if indent mode is enabled. The default value is two spaces.- Returns:
- the indent character(s) to use.
 
- 
getOutputModeThe output mode to use. The default value is JSONMode.RELAXED}.- Returns:
- the output mode.
 
- 
getMaxLengthpublic int getMaxLength()The maximum length of the JSON string. The string will be truncated at this length.- Returns:
- the maximum length of the JSON string
- Since:
- 3.7
 
- 
getNullConverterA converter from BSON Null values to JSON.- Returns:
- this
- Since:
- 3.5
 
- 
getStringConverterA converter from BSON String values to JSON.- Returns:
- this
- Since:
- 3.5
 
- 
getBinaryConverterA converter from BSON Binary values to JSON.- Returns:
- this
- Since:
- 3.5
 
- 
getBooleanConverterA converter from BSON Boolean values to JSON.- Returns:
- this
- Since:
- 3.5
 
- 
getDateTimeConverterA converter from BSON DateTime values to JSON.- Returns:
- this
- Since:
- 3.5
 
- 
getDoubleConverterA converter from BSON Double values to JSON.- Returns:
- this
- Since:
- 3.5
 
- 
getInt32ConverterA converter from BSON Int32 values to JSON.- Returns:
- this
- Since:
- 3.5
 
- 
getInt64ConverterA converter from BSON Int64 values to JSON.- Returns:
- this
- Since:
- 3.5
 
- 
getDecimal128ConverterA converter from BSON Decimal128 values to JSON.- Returns:
- this
- Since:
- 3.5
 
- 
getObjectIdConverterA converter from BSON ObjectId values to JSON.- Returns:
- this
- Since:
- 3.5
 
- 
getRegularExpressionConverterA converter from BSON RegularExpression values to JSON.- Returns:
- this
- Since:
- 3.5
 
- 
getTimestampConverterA converter from BSON Timestamp values to JSON.- Returns:
- this
- Since:
- 3.5
 
- 
getSymbolConverterA converter from BSON Symbol values to JSON.- Returns:
- this
- Since:
- 3.5
 
- 
getMinKeyConverterA converter from BSON MinKey values to JSON.- Returns:
- this
- Since:
- 3.5
 
- 
getMaxKeyConverterA converter from BSON MaxKey values to JSON.- Returns:
- this
- Since:
- 3.5
 
- 
getUndefinedConverterA converter from BSON Undefined values to JSON.- Returns:
- this
- Since:
- 3.5
 
- 
getJavaScriptConverterA converter from BSON JavaScript values to JSON.- Returns:
- this
- Since:
- 3.5
 
 
-