org.directwebremoting.json.types
Class JsonString
java.lang.Object
org.directwebremoting.json.types.JsonValue
org.directwebremoting.json.types.JsonString
public class JsonString
- extends JsonValue
The Json version of a String
- Author:
- Joe Walker [joe at getahead dot ltd dot uk]
|
Constructor Summary |
JsonString(java.lang.String value)
All JsonStrings wrap a Java string |
|
Method Summary |
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. |
java.lang.String |
toExternalRepresentation()
i.e. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
JsonString
public JsonString(java.lang.String value)
- All JsonStrings wrap a Java string
getString
public java.lang.String getString()
- Description copied from class:
JsonValue
- 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.
- Overrides:
getString in class JsonValue
- Returns:
- A String representing the
JsonNumber implementing this
toExternalRepresentation
public java.lang.String toExternalRepresentation()
- Description copied from class:
JsonValue
- i.e. How do we send this from one system to another?
- Specified by:
toExternalRepresentation in class JsonValue
- Returns:
- A string representing the portable version of this data
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object