|
||||||||||
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.PathCapturingJSONWriterWrapper
public class PathCapturingJSONWriterWrapper
TODO Proof of concept Should capture the JSON Path to the current element
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.codehaus.groovy.grails.web.json.JSONWriter |
---|
JSONWriter.Mode |
Field Summary |
---|
Fields inherited from class org.codehaus.groovy.grails.web.json.JSONWriter |
---|
comma, mode, writer |
Constructor Summary | |
---|---|
PathCapturingJSONWriterWrapper(JSONWriter delegate)
|
Method Summary | |
---|---|
JSONWriter |
append(String s)
Append a value. |
JSONWriter |
array()
Begin appending a new array. |
void |
comma()
|
JSONWriter |
end(JSONWriter.Mode m,
char c)
End something. |
JSONWriter |
endArray()
End an array. |
JSONWriter |
endObject()
End an object. |
String |
getCurrentStrackReference()
|
String |
getStackReference(int depth)
|
JSONWriter |
key(String s)
Append a key. |
JSONWriter |
object()
Begin appending a new object. |
void |
pop(JSONWriter.Mode c)
Pop an array or object scope. |
void |
push(JSONWriter.Mode c)
Push an array or object scope. |
JSONWriter |
value(boolean b)
Append either the value true or the value
false . |
JSONWriter |
value(double d)
Append a double value. |
JSONWriter |
value(long l)
Append a long value. |
JSONWriter |
value(Object o)
Append an object value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PathCapturingJSONWriterWrapper(JSONWriter delegate)
Method Detail |
---|
public JSONWriter append(String s)
JSONWriter
append
in class JSONWriter
s
- A string value.
public 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 end(JSONWriter.Mode m, char c)
JSONWriter
end
in class JSONWriter
m
- Modec
- Closing character
public JSONWriter endArray()
JSONWriter
array
.
endArray
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.
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 void pop(JSONWriter.Mode c)
JSONWriter
pop
in class JSONWriter
c
- The scope to close.public void push(JSONWriter.Mode c)
JSONWriter
push
in class JSONWriter
c
- The scope to open.public JSONWriter value(boolean b)
JSONWriter
true
or the value
false
.
value
in class JSONWriter
b
- A boolean.
public JSONWriter value(double d)
JSONWriter
value
in class JSONWriter
d
- A double.
public JSONWriter value(long l)
JSONWriter
value
in class JSONWriter
l
- A long.
public JSONWriter value(Object o)
JSONWriter
value
in class JSONWriter
o
- The object to append. It can be null, or a Boolean, Number,
String, JSONObject, or JSONArray.
public String getStackReference(int depth)
public String getCurrentStrackReference()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |