public class PrettyPrint extends WriterConfig
jsonValue.writeTo(writer, PrettyPrint.singleLine());
| Modifier and Type | Class and Description |
|---|---|
private static class |
PrettyPrint.PrettyPrintWriter |
| Modifier and Type | Field and Description |
|---|---|
private char[] |
indentChars |
MINIMAL, PRETTY_PRINT| Modifier | Constructor and Description |
|---|---|
protected |
PrettyPrint(char[] indentChars) |
| Modifier and Type | Method and Description |
|---|---|
protected JsonWriter |
createWriter(Writer writer) |
static PrettyPrint |
indentWithSpaces(int number)
Print every value on a separate line.
|
static PrettyPrint |
indentWithTabs()
Do not break lines, but still insert whitespace between values.
|
static PrettyPrint |
singleLine()
Print every value on a separate line.
|
public static PrettyPrint singleLine()
\t) for indentation.public static PrettyPrint indentWithSpaces(int number)
number - the number of spaces to usepublic static PrettyPrint indentWithTabs()
protected JsonWriter createWriter(Writer writer)
createWriter in class WriterConfigCopyright © 2011–2016 David R. Smith. All rights reserved.