Package com.google.gwt.json.client
Class JSONValue
- java.lang.Object
-
- com.google.gwt.json.client.JSONValue
-
- Direct Known Subclasses:
JSONArray,JSONBoolean,JSONNull,JSONNumber,JSONObject,JSONString
public abstract class JSONValue extends java.lang.ObjectThe superclass of all JSON value types.- See Also:
JSONArray,JSONBoolean,JSONNumber,JSONObject,JSONString
-
-
Constructor Summary
Constructors Constructor Description JSONValue()Not subclassable outside this package.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description (package private) abstract JavaScriptObjectgetUnwrapper()Internal.JSONArrayisArray()Returns a non-null reference if this JSONValue is really a JSONArray.JSONBooleanisBoolean()Returns a non-null reference if this JSONValue is really a JSONBoolean.JSONNullisNull()Returns a non-null reference if this JSONValue is really a JSONNull.JSONNumberisNumber()Returns a non-null reference if this JSONValue is really a JSONNumber.JSONObjectisObject()Returns non-null if this JSONValue is really a JSONObject.JSONStringisString()Returns a non-null reference if this JSONValue is really a JSONString.abstract java.lang.StringtoString()Returns a JSON-encoded string for this entity.
-
-
-
Method Detail
-
isArray
public JSONArray isArray()
Returns a non-null reference if this JSONValue is really a JSONArray.- Returns:
- a reference to a JSONArray if this JSONValue is a JSONArray or
nullotherwise.
-
isBoolean
public JSONBoolean isBoolean()
Returns a non-null reference if this JSONValue is really a JSONBoolean.- Returns:
- a reference to a JSONBoolean if this JSONValue is a JSONBoolean or
nullotherwise.
-
isNull
public JSONNull isNull()
Returns a non-null reference if this JSONValue is really a JSONNull.- Returns:
- a reference to a JSONNull if this JSONValue is a JSONNull or
nullotherwise.
-
isNumber
public JSONNumber isNumber()
Returns a non-null reference if this JSONValue is really a JSONNumber.- Returns:
- a reference to a JSONNumber if this JSONValue is a JSONNumber or
nullotherwise.
-
isObject
public JSONObject isObject()
Returns non-null if this JSONValue is really a JSONObject.- Returns:
- a reference to a JSONObject if this JSONValue is a JSONObject or
nullotherwise.
-
isString
public JSONString isString()
Returns a non-null reference if this JSONValue is really a JSONString.- Returns:
- a reference to a JSONString if this JSONValue is a JSONString or
nullotherwise.
-
toString
public abstract java.lang.String toString()
Returns a JSON-encoded string for this entity. Use this method to create JSON strings that can be sent from the client to a server.- Overrides:
toStringin classjava.lang.Object
-
getUnwrapper
abstract JavaScriptObject getUnwrapper()
Internal. Returns a JS func that can unwrap this value. Used from native code.
-
-