Class ObjectWriter.GeneratorSettings

  • All Implemented Interfaces:
    java.io.Serializable
    Enclosing class:
    ObjectWriter

    public static final class ObjectWriter.GeneratorSettings
    extends java.lang.Object
    implements java.io.Serializable
    Helper class used for containing settings specifically related to (re)configuring JsonGenerator constructed for writing output.
    Since:
    2.5
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      com.fasterxml.jackson.core.io.CharacterEscapes characterEscapes
      Caller may want to specify character escaping details, either as defaults, or on call-by-call basis.
      static ObjectWriter.GeneratorSettings empty  
      com.fasterxml.jackson.core.PrettyPrinter prettyPrinter
      To allow for dynamic enabling/disabling of pretty printing, pretty printer can be optionally configured for writer as well
      com.fasterxml.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.
      com.fasterxml.jackson.core.FormatSchema schema
      When using data format that uses a schema, schema is passed to generator.
    • Constructor Summary

      Constructors 
      Constructor Description
      GeneratorSettings​(com.fasterxml.jackson.core.PrettyPrinter pp, com.fasterxml.jackson.core.FormatSchema sch, com.fasterxml.jackson.core.io.CharacterEscapes esc, com.fasterxml.jackson.core.SerializableString rootSep)  
    • Field Detail

      • prettyPrinter

        public final com.fasterxml.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 com.fasterxml.jackson.core.FormatSchema schema
        When using data format that uses a schema, schema is passed to generator.
      • characterEscapes

        public final com.fasterxml.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 com.fasterxml.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 Detail

      • GeneratorSettings

        public GeneratorSettings​(com.fasterxml.jackson.core.PrettyPrinter pp,
                                 com.fasterxml.jackson.core.FormatSchema sch,
                                 com.fasterxml.jackson.core.io.CharacterEscapes esc,
                                 com.fasterxml.jackson.core.SerializableString rootSep)