DefaultPrettyPrinter (unless
overridden). Uses system-specific linefeeds and 2 spaces for indentation per level.
| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| private final String | |
| private static final int | INDENT_LEVELS
We expect to rarely get indentation deeper than this number of levels, and try not to pre-generate more indentations than needed. |
| private final char[] | |
| private static final long | |
| public static final String | |
| public static final DefaultIndenter |
| Access | Constructor and Description |
|---|---|
| public | |
| public | DefaultIndenter(String
Indentation String to prepend for a single level of indentation indent, String End-of-line marker to use after indented line eol)Create an indenter which uses the |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public String | |
| public boolean | |
| public DefaultIndenter | |
| public DefaultIndenter | |
| public void |
| charsPerLevel | back to summary |
|---|---|
| private final int charsPerLevel | |
| eol | back to summary |
|---|---|
| private final String eol | |
| INDENT_LEVELS | back to summary |
|---|---|
| private static final int INDENT_LEVELS We expect to rarely get indentation deeper than this number of levels, and try not to pre-generate more indentations than needed. | |
| indents | back to summary |
|---|---|
| private final char[] indents | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| SYS_LF | back to summary |
|---|---|
| public static final String SYS_LF | |
| SYSTEM_LINEFEED_INSTANCE | back to summary |
|---|---|
| public static final DefaultIndenter SYSTEM_LINEFEED_INSTANCE | |
| DefaultIndenter | back to summary |
|---|---|
| public DefaultIndenter() Indent with two spaces and the system's default line feed | |
| DefaultIndenter | back to summary |
|---|---|
| public DefaultIndenter(String indent, String eol) Create an indenter which uses the | |
| getEol | back to summary |
|---|---|
| public String getEol() | |
| getIndent | back to summary |
|---|---|
| public String getIndent() | |
| isInline | back to summary |
|---|---|
| public boolean isInline() Overrides com. Implements com.
| |
| withIndent | back to summary |
|---|---|
| public DefaultIndenter withIndent(String indent) | |
| withLinefeed | back to summary |
|---|---|
| public DefaultIndenter withLinefeed(String lf) | |
| writeIndentation | back to summary |
|---|---|
| public void writeIndentation(JsonGenerator jg, int level) throws IOException Overrides com. Implements com.
| |