|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.directwebremoting.json.types.JsonValue
public abstract class JsonValue
JsonValue allows you to hold any of the JSON types and to get a string version without needing to know what type you have.
| Constructor Summary | |
|---|---|
JsonValue()
|
|
| Method Summary | |
|---|---|
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. |
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. |
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. |
JsonArray |
getJsonArray()
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 |
JsonObject |
getJsonObject()
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 |
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. |
java.lang.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 java.lang.String |
toExternalRepresentation()
i.e. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JsonValue()
| Method Detail |
|---|
public abstract java.lang.String toExternalRepresentation()
public java.lang.String getString()
JsonValue you know which subtype it is,
this allows you to assume it is a string and get the Java value quickly.
JsonNumber implementing this
java.lang.ClassCastException - if this is not a JsonStringpublic int getInteger()
JsonValue you know which subtype it is,
this allows you to assume it is a number and get the Java value quickly.
JsonNumber implementing this
java.lang.ClassCastException - if this is not a JsonNumberpublic long getLong()
JsonValue you know which subtype it is,
this allows you to assume it is a number and get the Java value quickly.
JsonNumber implementing this
java.lang.ClassCastException - if this is not a JsonNumberpublic double getDouble()
JsonValue you know which subtype it is,
this allows you to assume it is a number and get the Java value quickly.
JsonNumber implementing this
java.lang.ClassCastException - if this is not a JsonNumberpublic boolean getBoolean()
JsonValue you know which subtype it is,
this allows you to assume it is a boolean and get the Java value quickly.
JsonNumber implementing this
java.lang.ClassCastException - if this is not a JsonNumberpublic JsonArray getJsonArray()
JsonValue you know which subtype it is,
this allows you to assume it is a JsonArray and get it quickly
JsonArray
java.lang.ClassCastException - if this is not a JsonArraypublic JsonObject getJsonObject()
JsonValue you know which subtype it is,
this allows you to assume it is a JsonObject and get it quickly
JsonObject
java.lang.ClassCastException - if this is not a JsonObject
|
Copyright ยจ 2008 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||