Class DefaultPrettyPrinter

java.lang.Object
org.codehaus.jackson.util.DefaultPrettyPrinter
All Implemented Interfaces:
PrettyPrinter
Direct Known Subclasses:
DefaultPrettyPrinter

public class DefaultPrettyPrinter extends Object implements PrettyPrinter
Default PrettyPrinter implementation that uses 2-space indentation with platform-default linefeeds. Usually this class is not instantiated directly, but instead method JsonGenerator.useDefaultPrettyPrinter() is used, which will use an instance of this class for operation.
  • Field Details

    • _arrayIndenter

      protected Indenter _arrayIndenter
      By default, let's use only spaces to separate array values.
    • _objectIndenter

      protected Indenter _objectIndenter
      By default, let's use linefeed-adding indenter for separate object entries. We'll further configure indenter to use system-specific linefeeds, and 2 spaces per level (as opposed to, say, single tabs)
    • _spacesInObjectEntries

      protected boolean _spacesInObjectEntries
      By default we will add spaces around colons used to separate object fields and values. If disabled, will not use spaces around colon.
    • _nesting

      protected int _nesting
      Number of open levels of nesting. Used to determine amount of indentation to use.
  • Constructor Details

    • DefaultPrettyPrinter

      public DefaultPrettyPrinter()
  • Method Details