|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.grails.web.json.JSONWriter org.codehaus.groovy.grails.web.json.PrettyPrintJSONWriter
public class PrettyPrintJSONWriter
A JSONWriter dedicated to create indented/pretty printed output.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.codehaus.groovy.grails.web.json.JSONWriter |
---|
JSONWriter.Mode |
Field Summary | |
---|---|
static String |
DEFAULT_INDENT_STR
|
static String |
NEWLINE
|
Fields inherited from class org.codehaus.groovy.grails.web.json.JSONWriter |
---|
comma, mode, writer |
Constructor Summary | |
---|---|
PrettyPrintJSONWriter(Writer w)
|
|
PrettyPrintJSONWriter(Writer w,
String indentStr)
|
Method Summary | |
---|---|
protected JSONWriter |
append(String s)
Append a value. |
JSONWriter |
array()
Begin appending a new array. |
protected void |
comma()
|
protected JSONWriter |
end(JSONWriter.Mode m,
char c)
End something. |
JSONWriter |
endArray()
End an array. |
JSONWriter |
endObject()
End an object. |
JSONWriter |
key(String s)
Append a key. |
JSONWriter |
object()
Begin appending a new object. |
Methods inherited from class org.codehaus.groovy.grails.web.json.JSONWriter |
---|
pop, push, value, value, value, value |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DEFAULT_INDENT_STR
public static final String NEWLINE
Constructor Detail |
---|
public PrettyPrintJSONWriter(Writer w)
public PrettyPrintJSONWriter(Writer w, String indentStr)
Method Detail |
---|
protected JSONWriter append(String s)
JSONWriter
append
in class JSONWriter
s
- A string value.
protected JSONWriter end(JSONWriter.Mode m, char c)
JSONWriter
end
in class JSONWriter
m
- Modec
- Closing character
protected void comma()
comma
in class JSONWriter
public JSONWriter array()
JSONWriter
endArray
will be appended to this array. The
endArray
method must be called to mark the array's end.
array
in class JSONWriter
public JSONWriter endArray()
JSONWriter
array
.
endArray
in class JSONWriter
public JSONWriter object()
JSONWriter
endObject
will be appended to this object. The
endObject
method must be called to mark the object's end.
object
in class JSONWriter
public JSONWriter endObject()
JSONWriter
object
.
endObject
in class JSONWriter
public JSONWriter key(String s)
JSONWriter
key
in class JSONWriter
s
- A key string.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |