public abstract class JsonPretty
extends java.lang.Object
Utility functions for pretty-printing JSON representation.
Constructor and Description |
---|
JsonPretty() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
print(JsonElement value)
|
static java.lang.String |
print(JsonElement value,
int indent)
Return JSON representation converted to a pretty printed string.
|
public static java.lang.String print(JsonElement value)
value
- Value parameter.public static java.lang.String print(JsonElement value, int indent)
Return JSON representation converted to a pretty printed string.
value
- (nullable) JSON representation.indent
- Optional starting indentation level. Defaults to zero; nested items are indented by 4.