|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface JSONArtifact
Interface class to define a set of generic apis both JSONObject and JSONArray implement. This is namely so that functions such as write, which are common between the two, can be easily invoked without knowing the object type.
Method Summary | |
---|---|
java.lang.String |
write()
Convert this object into a String of JSON text. |
java.lang.String |
write(boolean verbose)
Convert this object into a String of JSON text, specifying whether to use verbose (tab-indented) output or not. |
java.lang.String |
write(int indentDepth)
Convert this object into a String of JSON text, specifying how many spaces should be used for each indent. |
java.io.OutputStream |
write(java.io.OutputStream os)
Write this object to the stream as JSON text in UTF-8 encoding. |
java.io.OutputStream |
write(java.io.OutputStream os,
boolean verbose)
Write this object to the stream as JSON text in UTF-8 encoding, specifying whether to use verbose (tab-indented) output or not. |
java.io.OutputStream |
write(java.io.OutputStream os,
int indentDepth)
Write this object to the stream as JSON text in UTF-8 encoding, specifying how many spaces should be used for each indent. |
java.io.Writer |
write(java.io.Writer writer)
Write this object to the writer as JSON text. |
java.io.Writer |
write(java.io.Writer writer,
boolean verbose)
Writer this object to the writer as JSON text, specifying whether to use verbose (tab-indented) output or not. |
java.io.Writer |
write(java.io.Writer writer,
int indentDepth)
Write this object to the writer as JSON text, specifying how many spaces should be used for each indent. |
Method Detail |
---|
java.io.OutputStream write(java.io.OutputStream os) throws JSONException
os
- The output stream to write data to.
JSONException
- Thrown on errors during serialization.java.io.OutputStream write(java.io.OutputStream os, boolean verbose) throws JSONException
os
- The output stream to write data to.verbose
- Whether or not to write the JSON text in a verbose format. If true, will indent via tab.
JSONException
- Thrown on errors during serialization.java.io.OutputStream write(java.io.OutputStream os, int indentDepth) throws JSONException
indentDepth
- How many spaces to use for each indent. The value should be between one to eight.
Less than one means no indenting, greater than 8 and it will just use tab.
JSONException
- Thrown on errors during serialization.java.io.Writer write(java.io.Writer writer) throws JSONException
writer
- The writer which to write the JSON text to.
JSONException
- Thrown on errors during serialization.java.io.Writer write(java.io.Writer writer, boolean verbose) throws JSONException
writer
- The writer which to write the JSON text to.
JSONException
- Thrown on errors during serialization.java.io.Writer write(java.io.Writer writer, int indentDepth) throws JSONException
writer
- The writer which to write the JSON text to.indentDepth
- How many spaces to use for each indent. The value should be between one to eight.
JSONException
- Thrown on errors during serialization.java.lang.String write(boolean verbose) throws JSONException
verbose
- Whether or not to write in compressed format.
Less than one means no indenting, greater than 8 and it will just use tab.
JSONException
- Thrown on errors during serialization.java.lang.String write(int indentDepth) throws JSONException
indentDepth
- How many spaces to use for each indent. The value should be between one to eight.
Less than one means no indenting, greater than 8 and it will just use tab.
JSONException
- Thrown on errors during serialization.java.lang.String write() throws JSONException
JSONException
- Thrown on errors during serialization.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |