Class GeneratorSettings

java.lang.Object
tools.jackson.databind.cfg.GeneratorSettings
All Implemented Interfaces:
Serializable

public final class GeneratorSettings extends Object implements Serializable
Helper class used for containing settings specifically related to (re)configuring JsonGenerator constructed for writing output.
See Also:
  • Field Details

    • EMPTY

      protected static final GeneratorSettings EMPTY
    • NULL_ROOT_VALUE_SEPARATOR

      protected static final tools.jackson.core.io.SerializedString NULL_ROOT_VALUE_SEPARATOR
      Also need to use a null marker for root value separator
    • empty

      public static final GeneratorSettings empty
    • prettyPrinter

      public final tools.jackson.core.PrettyPrinter prettyPrinter
      To allow for dynamic enabling/disabling of pretty printing, pretty printer can be optionally configured for writer as well
    • schema

      public final tools.jackson.core.FormatSchema schema
      When using data format that uses a schema, schema is passed to generator.
    • characterEscapes

      public final tools.jackson.core.io.CharacterEscapes characterEscapes
      Caller may want to specify character escaping details, either as defaults, or on call-by-call basis.
    • rootValueSeparator

      public final tools.jackson.core.SerializableString rootValueSeparator
      Caller may want to override so-called "root value separator", String added (verbatim, with no quoting or escaping) between values in root context. Default value is a single space character, but this is often changed to linefeed.
  • Constructor Details

    • GeneratorSettings

      public GeneratorSettings(tools.jackson.core.PrettyPrinter pp, tools.jackson.core.FormatSchema sch, tools.jackson.core.io.CharacterEscapes esc, tools.jackson.core.SerializableString rootSep)
  • Method Details

    • empty

      public static GeneratorSettings empty()
    • with

      public GeneratorSettings with(tools.jackson.core.PrettyPrinter pp)
    • with

      public GeneratorSettings with(tools.jackson.core.FormatSchema sch)
    • with

      public GeneratorSettings with(tools.jackson.core.io.CharacterEscapes esc)
    • withRootValueSeparator

      public GeneratorSettings withRootValueSeparator(String sep)
    • withRootValueSeparator

      public GeneratorSettings withRootValueSeparator(tools.jackson.core.SerializableString sep)
    • getSchema

      public tools.jackson.core.FormatSchema getSchema()
    • getCharacterEscapes

      public tools.jackson.core.io.CharacterEscapes getCharacterEscapes()
    • getPrettyPrinter

      public tools.jackson.core.PrettyPrinter getPrettyPrinter()
    • hasPrettyPrinter

      public boolean hasPrettyPrinter()
    • getRootValueSeparator

      public tools.jackson.core.SerializableString getRootValueSeparator(tools.jackson.core.SerializableString defaultSep)