public class PrettyPrintJSONWriter extends JSONWriter
A JSONWriter dedicated to create indented/pretty printed output.
Modifiers | Name | Description |
---|---|---|
static java.lang.String |
DEFAULT_INDENT_STR |
|
static java.lang.String |
NEWLINE |
|
private int |
indentLevel |
|
private java.lang.String |
indentStr |
Fields inherited from class | Fields |
---|---|
class JSONWriter |
comma, mode, nullWritable, stack, writer |
Constructor and description |
---|
PrettyPrintJSONWriter
(java.io.Writer w) |
PrettyPrintJSONWriter
(java.io.Writer w, java.lang.String indentStr) |
Type Params | Return Type | Name and description |
---|---|---|
|
protected JSONWriter |
append(groovy.lang.Writable writableValue) |
|
public JSONWriter |
array() |
|
protected JSONWriter |
end(JSONWriter.Mode m, char c) |
|
public JSONWriter |
endArray() |
|
public JSONWriter |
endObject() |
|
private void |
indent() |
|
public JSONWriter |
key(java.lang.String s) |
|
private void |
newline() |
|
public JSONWriter |
object() |