Groovy Documentation

## org.codehaus.groovy.grails.web.json
[Java] Class PrettyPrintJSONWriter

    java.lang.Object
      org.codehaus.groovy.grails.web.json.JSONWriter
          org.codehaus.groovy.grails.web.json.PrettyPrintJSONWriter

    public class PrettyPrintJSONWriter
    extends JSONWriter

A JSONWriter dedicated to create indented/pretty printed output.

Authors:
  Siegfried Puchbauer

Since:
  1.1

Field Summary
`static java.lang.String` | `DEFAULT_INDENT_STR`
`static java.lang.String` | `NEWLINE`

Fields inherited from class JSONWriter
comma, mode, writer

Constructor Summary
`PrettyPrintJSONWriter(java.io.Writer w)`
`PrettyPrintJSONWriter(java.io.Writer w, java.lang.String indentStr)`

Method Summary
`protected JSONWriter` | `append(java.lang.String s)`
`JSONWriter` | `array()`
`protected JSONWriter` | `end(Mode m, char c)`
`JSONWriter` | `endArray()`
`JSONWriter` | `endObject()`
`JSONWriter` | `key(java.lang.String s)`
`JSONWriter` | `object()`

Methods inherited from class JSONWriter
append, array, comma, end, endArray, endObject, key, object, pop, push, value, value, value, value

Field Detail

### DEFAULT_INDENT_STR

    public static final java.lang.String DEFAULT_INDENT_STR

### NEWLINE

    public static final java.lang.String NEWLINE

Constructor Detail

### PrettyPrintJSONWriter

    public PrettyPrintJSONWriter(java.io.Writer w)

### PrettyPrintJSONWriter

    public PrettyPrintJSONWriter(java.io.Writer w, java.lang.String indentStr)

Method Detail

### append

    @Override
    protected JSONWriter append(java.lang.String s)

### array

    @Override
    public JSONWriter array()

### end

    @Override
    protected JSONWriter end(Mode m, char c)

### endArray

    @Override
    public JSONWriter endArray()

### endObject

    @Override
    public JSONWriter endObject()

### key

    @Override
    public JSONWriter key(java.lang.String s)

### object

    @Override
    public JSONWriter object()

Groovy Documentation