public class JsonWriterSettings extends BsonWriterSettings
JSONWriter
instance.JsonWriter
Modifier and Type | Class and Description |
---|---|
static class |
JsonWriterSettings.Builder
A builder for JsonWriterSettings
|
Constructor and Description |
---|
JsonWriterSettings()
Deprecated.
Prefer
builder() , but note that the default output mode is different for that method |
JsonWriterSettings(boolean indent)
Deprecated.
Use the
JsonWriterSettings.Builder instead |
JsonWriterSettings(JsonMode outputMode)
Deprecated.
Use the
JsonWriterSettings.Builder instead |
JsonWriterSettings(JsonMode outputMode,
boolean indent)
Deprecated.
Use the
JsonWriterSettings.Builder instead |
JsonWriterSettings(JsonMode outputMode,
String indentCharacters)
Deprecated.
Use the
JsonWriterSettings.Builder instead |
JsonWriterSettings(JsonMode outputMode,
String indentCharacters,
String newLineCharacters)
Deprecated.
Use the
JsonWriterSettings.Builder instead |
Modifier and Type | Method and Description |
---|---|
static JsonWriterSettings.Builder |
builder()
Create a builder for JsonWriterSettings, which are immutable.
|
Converter<BsonBinary> |
getBinaryConverter()
A converter from BSON Binary values to JSON.
|
Converter<Boolean> |
getBooleanConverter()
A converter from BSON Boolean values to JSON.
|
Converter<Long> |
getDateTimeConverter()
A converter from BSON DateTime values to JSON.
|
Converter<Decimal128> |
getDecimal128Converter()
A converter from BSON Decimal128 values to JSON.
|
Converter<Double> |
getDoubleConverter()
A converter from BSON Double values to JSON.
|
String |
getIndentCharacters()
The indent characters to use if indent mode is enabled.
|
Converter<Integer> |
getInt32Converter()
A converter from BSON Int32 values to JSON.
|
Converter<Long> |
getInt64Converter()
A converter from BSON Int64 values to JSON.
|
Converter<String> |
getJavaScriptConverter()
A converter from BSON JavaScript values to JSON.
|
Converter<BsonMaxKey> |
getMaxKeyConverter()
A converter from BSON MaxKey values to JSON.
|
Converter<BsonMinKey> |
getMinKeyConverter()
A converter from BSON MinKey values to JSON.
|
String |
getNewLineCharacters()
The new line character(s) to use if indent mode is enabled.
|
Converter<BsonNull> |
getNullConverter()
A converter from BSON Null values to JSON.
|
Converter<ObjectId> |
getObjectIdConverter()
A converter from BSON ObjectId values to JSON.
|
JsonMode |
getOutputMode()
The output mode to use.
|
Converter<BsonRegularExpression> |
getRegularExpressionConverter()
A converter from BSON RegularExpression values to JSON.
|
Converter<String> |
getStringConverter()
A converter from BSON String values to JSON.
|
Converter<String> |
getSymbolConverter()
A converter from BSON Symbol values to JSON.
|
Converter<BsonTimestamp> |
getTimestampConverter()
A converter from BSON Timestamp values to JSON.
|
Converter<BsonUndefined> |
getUndefinedConverter()
A converter from BSON Undefined values to JSON.
|
boolean |
isIndent()
The indentation mode.
|
getMaxSerializationDepth
@Deprecated public JsonWriterSettings()
builder()
, but note that the default output mode is different for that method
Defaults to JsonMode.STRICT
@Deprecated public JsonWriterSettings(JsonMode outputMode)
JsonWriterSettings.Builder
insteadoutputMode
- the output mode@Deprecated public JsonWriterSettings(boolean indent)
JsonWriterSettings.Builder
insteadindent
- whether indent mode is enabled@Deprecated public JsonWriterSettings(JsonMode outputMode, boolean indent)
JsonWriterSettings.Builder
insteadoutputMode
- the output modeindent
- whether indent mode is enabled@Deprecated public JsonWriterSettings(JsonMode outputMode, String indentCharacters)
JsonWriterSettings.Builder
insteadnewLineCharacters
.outputMode
- the output modeindentCharacters
- the indent characters@Deprecated public JsonWriterSettings(JsonMode outputMode, String indentCharacters, String newLineCharacters)
JsonWriterSettings.Builder
insteadoutputMode
- the output modeindentCharacters
- the indent charactersnewLineCharacters
- the new line character(s) to usepublic static JsonWriterSettings.Builder builder()
Defaults to JsonMode.RELAXED
public boolean isIndent()
false
.public String getNewLineCharacters()
System.getProperty("line.separator")
.public String getIndentCharacters()
public JsonMode getOutputMode()
public Converter<BsonNull> getNullConverter()
public Converter<String> getStringConverter()
public Converter<BsonBinary> getBinaryConverter()
public Converter<Boolean> getBooleanConverter()
public Converter<Long> getDateTimeConverter()
public Converter<Double> getDoubleConverter()
public Converter<Integer> getInt32Converter()
public Converter<Long> getInt64Converter()
public Converter<Decimal128> getDecimal128Converter()
public Converter<ObjectId> getObjectIdConverter()
public Converter<BsonRegularExpression> getRegularExpressionConverter()
public Converter<BsonTimestamp> getTimestampConverter()
public Converter<String> getSymbolConverter()
public Converter<BsonMinKey> getMinKeyConverter()
public Converter<BsonMaxKey> getMaxKeyConverter()
public Converter<BsonUndefined> getUndefinedConverter()