org.directwebremoting.json.types
Class JsonString

java.lang.Object
  extended by org.directwebremoting.json.types.JsonValue
      extended by 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 org.directwebremoting.json.types.JsonValue
getBoolean, getDouble, getInteger, getJsonArray, getJsonObject, getLong
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JsonString

public JsonString(java.lang.String value)
All JsonStrings wrap a Java string

Method Detail

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

Copyright 2008