| java.lang.Object org.directwebremoting.json.JsonValue
All known Subclasses: org.directwebremoting.json.JsonString, org.directwebremoting.json.JsonNumber, org.directwebremoting.json.JsonArray, org.directwebremoting.json.JsonNull, org.directwebremoting.json.JsonBoolean, org.directwebremoting.json.JsonObject, org.directwebremoting.json.JsonHack,
JsonValue | abstract public class JsonValue (Code) | | JsonValue allows you to hold any of the JSON types and to get a string
version without needing to know what type you have.
author: Joe Walker [joe at getahead dot ltd dot uk] |
Method Summary | |
public boolean | getBoolean() Often when dealing with a
JsonValue you know which subtype it is,
this allows you to assume it is a boolean and get the Java value quickly. | public double | getDouble() Often when dealing with a
JsonValue you know which subtype it is,
this allows you to assume it is a number and get the Java value quickly. | public int | getInteger() Often when dealing with a
JsonValue you know which subtype it is,
this allows you to assume it is a number and get the Java value quickly. | public JsonArray | getJsonArray() | public JsonObject | getJsonObject() | public long | getLong() Often when dealing with a
JsonValue you know which subtype it is,
this allows you to assume it is a number and get the Java value quickly. | public String | getString() Often when dealing with a
JsonValue you know which subtype it is,
this allows you to assume it is a string and get the Java value quickly. | abstract public String | toExternalRepresentation() i.e. |
getBoolean | public boolean getBoolean()(Code) | | Often when dealing with a
JsonValue you know which subtype it is,
this allows you to assume it is a boolean and get the Java value quickly.
A boolean representing the JsonNumber implementing this throws: ClassCastException - if this is not a JsonNumber |
getDouble | public double getDouble()(Code) | | Often when dealing with a
JsonValue you know which subtype it is,
this allows you to assume it is a number and get the Java value quickly.
A double representing the JsonNumber implementing this throws: ClassCastException - if this is not a JsonNumber |
getInteger | public int getInteger()(Code) | | Often when dealing with a
JsonValue you know which subtype it is,
this allows you to assume it is a number and get the Java value quickly.
An int representing the JsonNumber implementing this throws: ClassCastException - if this is not a JsonNumber |
getJsonArray | public JsonArray getJsonArray()(Code) | | Often when dealing with a
JsonValue you know which subtype it is,
this allows you to assume it is a JsonArray and get it quickly
A cast of this to JsonArray throws: ClassCastException - if this is not a JsonArray |
getJsonObject | public JsonObject getJsonObject()(Code) | | Often when dealing with a
JsonValue you know which subtype it is,
this allows you to assume it is a JsonObject and get it quickly
A cast of this to JsonObject throws: ClassCastException - if this is not a JsonObject |
getLong | public long getLong()(Code) | | Often when dealing with a
JsonValue you know which subtype it is,
this allows you to assume it is a number and get the Java value quickly.
A long representing the JsonNumber implementing this throws: ClassCastException - if this is not a JsonNumber |
getString | public String getString()(Code) | | Often when dealing with a
JsonValue you know which subtype it is,
this allows you to assume it is a string and get the Java value quickly.
A String representing the JsonNumber implementing this throws: ClassCastException - if this is not a JsonString |
toExternalRepresentation | abstract public String toExternalRepresentation()(Code) | | i.e. How do we send this from one system to another?
A string representing the portable version of this data |
|
|