Package org.bson.json

Class StrictCharacterStreamJsonWriterSettings


  • public final class StrictCharacterStreamJsonWriterSettings
    extends java.lang.Object
    Settings to control the behavior of a JSONWriter instance.
    Since:
    3.5
    See Also:
    StrictCharacterStreamJsonWriter
    • Method Detail

      • isIndent

        public boolean isIndent()
        The indentation mode. If true, output will be indented. Otherwise, it will all be on the same line. The default value is false.
        Returns:
        whether output should be indented.
      • getNewLineCharacters

        public java.lang.String getNewLineCharacters()
        The new line character(s) to use if indent mode is enabled. The default value is System.getProperty("line.separator").
        Returns:
        the new line character(s) to use.
      • getIndentCharacters

        public java.lang.String getIndentCharacters()
        The indent characters to use if indent mode is enabled. The default value is two spaces.
        Returns:
        the indent character(s) to use.
      • getMaxLength

        public 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