xv.json
Class JSONVariant
java.lang.Object
xv.json.JSONVariant
- Direct Known Subclasses:
- JSONArray, JSONBoolean, JSONNumber, JSONObject, JSONString
public abstract class JSONVariant
- extends Object
The base class of all JSON objects.
- Author:
- xv
Method Summary |
abstract String |
getType()
Returns a string description of the type - one of "array" ,
"object" , "boolean" , "number" , or "string" . |
String |
toJSON()
Creates a representation of this object as a JSON stream. |
void |
write(JSONWriter out)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JSONVariant
public JSONVariant()
getType
public abstract String getType()
- Returns a string description of the type - one of
"array"
,
"object"
, "boolean"
, "number"
, or "string"
.
- Returns:
write
public void write(JSONWriter out)
throws IOException
- Throws:
IOException
toJSON
public String toJSON()
- Creates a representation of this object as a JSON stream.
- Returns:
Copyright © 2008-2011. All Rights Reserved.