public class JsonWriterSettings extends BsonWriterSettings
JSONWriter instance.JsonWriter| 构造器和说明 |
|---|
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,
java.lang.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,
java.lang.String indentCharacters,
java.lang.String newLineCharacters)
Creates a new instance with the given values for all properties and indent mode enabled.
|
| 限定符和类型 | 方法和说明 |
|---|---|
java.lang.String |
getIndentCharacters()
The indent characters to use if indent mode is enabled.
|
java.lang.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, java.lang.String indentCharacters)
newLineCharacters.outputMode - the output modeindentCharacters - the indent characterspublic JsonWriterSettings(JsonMode outputMode, java.lang.String indentCharacters, java.lang.String newLineCharacters)
outputMode - the output modeindentCharacters - the indent charactersnewLineCharacters - the new line character(s) to usepublic boolean isIndent()
false.public java.lang.String getNewLineCharacters()
System.getProperty("line.separator").public java.lang.String getIndentCharacters()
public JsonMode getOutputMode()