Package com.jme3.plugins.json
Interface JsonElement
- All Known Subinterfaces:
JsonObject
public interface JsonElement
A generic element
- Author:
- Riccardo Balbo
-
Method Summary
Modifier and TypeMethodDescription<T extends JsonElement>
TautoCast()Cast this JsonElement to a specific typebooleanReturns the object as a booleanfloatReturns the object as a floatintgetAsInt()Returns the object as an intReturns the object as a JsonArrayReturns the object as a JsonObjectReturns the object as a JsonPrimitiveReturns the object as a NumberReturns the object as a String
-
Method Details
-
getAsString
String getAsString()Returns the object as a String- Returns:
- the string
-
getAsJsonObject
JsonObject getAsJsonObject()Returns the object as a JsonObject- Returns:
- the JsonObject
-
getAsFloat
float getAsFloat()Returns the object as a float- Returns:
- the float
-
getAsInt
int getAsInt()Returns the object as an int- Returns:
- the int
-
getAsBoolean
boolean getAsBoolean()Returns the object as a boolean- Returns:
- the boolean
-
getAsJsonArray
JsonArray getAsJsonArray()Returns the object as a JsonArray- Returns:
- the JsonArray
-
getAsNumber
Number getAsNumber()Returns the object as a Number- Returns:
- the Number
-
getAsJsonPrimitive
JsonPrimitive getAsJsonPrimitive()Returns the object as a JsonPrimitive- Returns:
- the json primitive
-
autoCast
Cast this JsonElement to a specific type- Returns:
- the casted JsonElement
-