Package org.bson.json

Class StrictCharacterStreamJsonWriterSettings.Builder

  • Enclosing class:
    StrictCharacterStreamJsonWriterSettings

    public static final class StrictCharacterStreamJsonWriterSettings.Builder
    extends java.lang.Object
    A builder for StrictCharacterStreamJsonWriterSettings
    Since:
    3.4
    • Method Detail

      • newLineCharacters

        public StrictCharacterStreamJsonWriterSettings.Builder newLineCharacters​(java.lang.String newLineCharacters)
        Sets the new line character string to use when indentation is enabled.
        Parameters:
        newLineCharacters - the non-null new line character string
        Returns:
        this
      • indentCharacters

        public StrictCharacterStreamJsonWriterSettings.Builder indentCharacters​(java.lang.String indentCharacters)
        Sets the indent character string to use when indentation is enabled.
        Parameters:
        indentCharacters - the non-null indent character string
        Returns:
        this
      • maxLength

        public StrictCharacterStreamJsonWriterSettings.Builder maxLength​(int maxLength)
        Sets the maximum length of the JSON string. The string will be truncated at this length.
        Parameters:
        maxLength - the maximum length, which must be >= 0 where 0 indicate no maximum length
        Returns:
        the maximum length of the JSON string
        Since:
        3.7