public class JsonWriterSettings extends BsonWriterSettings
JSONWriter instance.JsonWriter| Constructor and Description |
|---|
JsonWriterSettings()
Creates a new instance with default values for all properties.
|
JsonWriterSettings(boolean indent)
Creates a new instance with indent mode enabled, and the default value for all other properties.
|
JsonWriterSettings(JsonMode outputMode)
Creates a new instance with the given output mode and default values for all other properties.
|
JsonWriterSettings(JsonMode outputMode,
boolean indent)
Creates a new instance with the given output mode, indent mode enabled, and the default value for all other properties.
|
JsonWriterSettings(JsonMode outputMode,
String indentCharacters)
Creates a new instance with the given values for all properties, indent mode enabled and the default value of
newLineCharacters. |
JsonWriterSettings(JsonMode outputMode,
String indentCharacters,
String newLineCharacters)
Creates a new instance with the given values for all properties and indent mode enabled.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getIndentCharacters()
The indent characters to use if indent mode is enabled.
|
String |
getNewLineCharacters()
The new line character(s) to use if indent mode is enabled.
|
JsonMode |
getOutputMode()
The output mode to use.
|
boolean |
isIndent()
The indentation mode.
|
getMaxSerializationDepthpublic JsonWriterSettings()
public JsonWriterSettings(JsonMode outputMode)
outputMode - the output modepublic JsonWriterSettings(boolean indent)
indent - whether indent mode is enabledpublic JsonWriterSettings(JsonMode outputMode, boolean indent)
outputMode - the output modeindent - whether indent mode is enabledpublic JsonWriterSettings(JsonMode outputMode, String indentCharacters)
newLineCharacters.outputMode - the output modeindentCharacters - the indent characterspublic JsonWriterSettings(JsonMode outputMode, String indentCharacters, String newLineCharacters)
outputMode - the output modeindentCharacters - the indent charactersnewLineCharacters - the new line character(s) to usepublic boolean isIndent()
false.public String getNewLineCharacters()
System.getProperty("line.separator").public String getIndentCharacters()
public JsonMode getOutputMode()