Package elemental.json.impl
Class JreJsonString
- java.lang.Object
 - 
- elemental.json.impl.JreJsonValue
 - 
- elemental.json.impl.JreJsonString
 
 
 
- 
- All Implemented Interfaces:
 JsonString,JsonValue,Serializable
public class JreJsonString extends JreJsonValue implements JsonString
Server-side implementation of JsonString.- See Also:
 - Serialized Form
 
 
- 
- 
Constructor Summary
Constructors Constructor Description JreJsonString(String string) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanasBoolean()Coerces underlying value to boolean according to the rules of Javascript coercion.doubleasNumber()Coerces the underlying value to a number according to the rules of Javascript coercion.StringasString()Coerces the underlying value to a String according to the rules of JavaScript coercion.ObjectgetObject()StringgetString()JsonTypegetType()Returns an enumeration representing the fundamental JSON type.booleanjsEquals(JsonValue value)Equivalent of Javascript '==' operator comparison between two values.StringtoJson()Returns a serialized JSON string representing this value.voidtraverse(elemental.json.impl.JsonVisitor visitor, elemental.json.impl.JsonContext ctx)- 
Methods inherited from class elemental.json.impl.JreJsonValue
parseJson, toNative 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
JreJsonString
public JreJsonString(String string)
 
 - 
 
- 
Method Detail
- 
asBoolean
public boolean asBoolean()
Description copied from interface:JsonValueCoerces underlying value to boolean according to the rules of Javascript coercion. 
- 
asNumber
public double asNumber()
Description copied from interface:JsonValueCoerces the underlying value to a number according to the rules of Javascript coercion. 
- 
asString
public String asString()
Description copied from interface:JsonValueCoerces the underlying value to a String according to the rules of JavaScript coercion. 
- 
getObject
public Object getObject()
- Specified by:
 getObjectin classJreJsonValue
 
- 
getString
public String getString()
- Specified by:
 getStringin interfaceJsonString
 
- 
getType
public JsonType getType()
Description copied from interface:JsonValueReturns an enumeration representing the fundamental JSON type. 
- 
jsEquals
public boolean jsEquals(JsonValue value)
Description copied from interface:JsonValueEquivalent of Javascript '==' operator comparison between two values. 
- 
traverse
public void traverse(elemental.json.impl.JsonVisitor visitor, elemental.json.impl.JsonContext ctx)- Specified by:
 traversein classJreJsonValue
 
- 
toJson
public String toJson() throws IllegalStateException
Description copied from interface:JsonValueReturns a serialized JSON string representing this value.- Specified by:
 toJsonin interfaceJsonValue- Returns:
 - Throws:
 IllegalStateException
 
 - 
 
 -