public class DefaultIndenter extends DefaultPrettyPrinter.NopIndenter
DefaultPrettyPrinter
(unless
overridden). Uses system-specific linefeeds and 2 spaces for indentation per level.Modifier and Type | Field and Description |
---|---|
static String |
SYS_LF |
static DefaultIndenter |
SYSTEM_LINEFEED_INSTANCE |
instance
Constructor and Description |
---|
DefaultIndenter()
Indent with two spaces and the system's default line feed
|
DefaultIndenter(String indent,
String eol)
Create an indenter which uses the
indent string to indent one level
and the eol string to separate lines. |
Modifier and Type | Method and Description |
---|---|
String |
getEol() |
String |
getIndent() |
boolean |
isInline() |
DefaultIndenter |
withIndent(String indent) |
DefaultIndenter |
withLinefeed(String lf) |
void |
writeIndentation(JsonGenerator jg,
int level) |
public static final String SYS_LF
public static final DefaultIndenter SYSTEM_LINEFEED_INSTANCE
public DefaultIndenter()
public DefaultIndenter withLinefeed(String lf)
public DefaultIndenter withIndent(String indent)
public boolean isInline()
isInline
in interface DefaultPrettyPrinter.Indenter
isInline
in class DefaultPrettyPrinter.NopIndenter
public void writeIndentation(JsonGenerator jg, int level) throws IOException
writeIndentation
in interface DefaultPrettyPrinter.Indenter
writeIndentation
in class DefaultPrettyPrinter.NopIndenter
IOException
public String getEol()
public String getIndent()
Copyright © 2014-2015 FasterXML. All Rights Reserved.