public class PrettyPrint extends WriterConfig
jsonValue.writeTo(writer, PrettyPrint.singleLine());
Modifier and Type | Field and Description |
---|---|
static WriterConfig |
PRETTY_PRINT
Write JSON in pretty-print, with each value on a separate line and an indentation of two
spaces.
|
MINIMAL
Modifier | Constructor and Description |
---|---|
protected |
PrettyPrint(char[] indentChars) |
Modifier and Type | Method and Description |
---|---|
protected com.hazelcast.internal.json.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 final WriterConfig PRETTY_PRINT
public static PrettyPrint singleLine()
\t
) for indentation.public static PrettyPrint indentWithSpaces(int number)
number
- the number of spaces to usepublic static PrettyPrint indentWithTabs()
protected com.hazelcast.internal.json.JsonWriter createWriter(Writer writer)
Copyright © 2021 Hazelcast, Inc.. All Rights Reserved.