
public class JreJsonBoolean extends JreJsonValue implements JsonBoolean
| Constructor and Description |
|---|
JreJsonBoolean(boolean bool) |
| 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.
|
boolean |
getBoolean() |
Object |
getObject() |
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) |
toNativepublic boolean asBoolean()
JsonValuepublic double asNumber()
JsonValuepublic String asString()
JsonValuepublic boolean getBoolean()
getBoolean in interface JsonBooleanpublic Object getObject()
getObject in class JreJsonValuepublic JsonType getType()
JsonValuepublic boolean jsEquals(JsonValue value)
JsonValuepublic void traverse(elemental.json.impl.JsonVisitor visitor,
elemental.json.impl.JsonContext ctx)
traverse in class JreJsonValuepublic String toJson() throws IllegalStateException
JsonValuetoJson in interface JsonValueIllegalStateExceptionCopyright © 2016. All rights reserved.