|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface JSON
Marker interface, identifies a valid JSON value.
A JSON value may be a JSONObject
, a JSONArray
or a
JSONNull
.
Method Summary | |
---|---|
boolean |
isArray()
Returns true if this object is a JSONArray, false otherwise. |
boolean |
isEmpty()
Returns true if this object has no elements or keys. |
int |
size()
Returns the number of properties in an object or the size of the array. |
String |
toString(int indentFactor)
Make a prettyprinted JSON text. |
String |
toString(int indentFactor,
int indent)
Make a prettyprinted JSON text. |
Writer |
write(Writer writer)
Write the contents as JSON text to a writer. |
Method Detail |
---|
boolean isArray()
boolean isEmpty()
JSONException
- if called on a 'null' objectint size()
JSONException
- if called on a 'null' objectString toString(int indentFactor)
Warning: This method assumes that the data structure is acyclical.
indentFactor
- The number of spaces to add to each level of
indentation.
{
(left
brace) and ending with }
(right
brace).
JSONException
- If the object contains an invalid number.String toString(int indentFactor, int indent)
Warning: This method assumes that the data structure is acyclical.
indentFactor
- The number of spaces to add to each level of
indentation.indent
- The indentation of the top level.
{
(left brace)
and ending with }
(right brace).
JSONException
- If the object contains an invalid number.Writer write(Writer writer)
Warning: This method assumes that the data structure is acyclical.
JSONException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |