public class JreJsonString extends JreJsonValue implements JsonString
Constructor and Description |
---|
JreJsonString(String string) |
Modifier and Type | Method and Description |
---|---|
boolean |
asBoolean()
Coerces underlying value to boolean according to the rules of Javascript coercion.
|
double |
asNumber()
Coerces the underlying value to a number according to the rules of Javascript coercion.
|
String |
asString()
Coerces the underlying value to a String according to the rules of JavaScript coercion.
|
Object |
getObject() |
String |
getString() |
JsonType |
getType()
Returns an enumeration representing the fundamental JSON type.
|
boolean |
jsEquals(JsonValue value)
Equivalent of Javascript '==' operator comparison between two values.
|
String |
toJson()
Returns a serialized JSON string representing this value.
|
void |
traverse(elemental.json.impl.JsonVisitor visitor,
elemental.json.impl.JsonContext ctx) |
toNative
public JreJsonString(String string)
public boolean asBoolean()
JsonValue
public double asNumber()
JsonValue
public String asString()
JsonValue
public Object getObject()
getObject
in class JreJsonValue
public String getString()
getString
in interface JsonString
public JsonType getType()
JsonValue
public boolean jsEquals(JsonValue value)
JsonValue
public void traverse(elemental.json.impl.JsonVisitor visitor, elemental.json.impl.JsonContext ctx)
traverse
in class JreJsonValue
public String toJson() throws IllegalStateException
JsonValue
toJson
in interface JsonValue
IllegalStateException
Copyright © 2018. All rights reserved.