Package org.dashbuilder.json
Interface JsonValue
-
- All Known Implementing Classes:
JsonArray,JsonBoolean,JsonNull,JsonNumber,JsonObject,JsonString
public interface JsonValueBase interface for all Json values.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanasBoolean()Convert the underlying value to booleandoubleasNumber()Convert the underlying value to a numberStringasString()Convert the underlying value to a StringJsonTypegetType()Returns an enumeration representing the fundamental JSON type.booleanisEmpty()Check if the json has no value stored.StringtoJson()Returns a serialized JSON string representing this value.voidtraverse(org.dashbuilder.json.JsonVisitor visitor, org.dashbuilder.json.JsonContext ctx)Visitor interface
-
-
-
Method Detail
-
asBoolean
boolean asBoolean()
Convert the underlying value to boolean
-
asNumber
double asNumber()
Convert the underlying value to a number
-
asString
String asString()
Convert the underlying value to a String
-
isEmpty
boolean isEmpty()
Check if the json has no value stored.
-
getType
JsonType getType()
Returns an enumeration representing the fundamental JSON type.
-
toJson
String toJson()
Returns a serialized JSON string representing this value.
-
traverse
void traverse(org.dashbuilder.json.JsonVisitor visitor, org.dashbuilder.json.JsonContext ctx)Visitor interface
-
-