public interface JsonObject extends JsonStructure, Map<String,JsonValue>
{
"name":"karl",
"age":38,
"address": {
"street":"dummystreet"
"housenumber":12
}
}
A JsonObject is always also a Map which uses the attribute names as key mapping
to their JsonValues.JsonValue.ValueTypeEMPTY_JSON_ARRAY, EMPTY_JSON_OBJECT, FALSE, NULL, TRUE| Modifier and Type | Method and Description |
|---|---|
boolean |
getBoolean(String name) |
boolean |
getBoolean(String name,
boolean defaultValue) |
int |
getInt(String name) |
int |
getInt(String name,
int defaultValue) |
JsonArray |
getJsonArray(String name) |
JsonNumber |
getJsonNumber(String name) |
JsonObject |
getJsonObject(String name) |
JsonString |
getJsonString(String name) |
String |
getString(String name) |
String |
getString(String name,
String defaultValue) |
boolean |
isNull(String name) |
getValueasJsonArray, asJsonObject, getValueType, toStringclear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesJsonArray getJsonArray(String name)
null if there is no attribute with that nameClassCastException - if the JsonValue cannot be correctly castJsonObject getJsonObject(String name)
null if there is no attribute with that nameClassCastException - if the JsonValue cannot be correctly castJsonNumber getJsonNumber(String name)
null if there is no attribute with that nameClassCastException - if the JsonValue cannot be correctly castJsonString getJsonString(String name)
null if there is no attribute with that nameClassCastException - if the JsonValue cannot be correctly castString getString(String name)
null if there is no attribute with that nameClassCastException - if the JsonValue cannot be correctly castString getString(String name, String defaultValue)
ClassCastException - if the JsonValue cannot be correctly castint getInt(String name)
null if there is no attribute with that nameClassCastException - if the JsonValue cannot be correctly castNullPointerException - if an object with the given name doesn't existint getInt(String name, int defaultValue)
ClassCastException - if the JsonValue cannot be correctly castboolean getBoolean(String name)
null if there is no attribute with that nameClassCastException - if the JsonValue cannot be correctly castNullPointerException - if an object with the given name doesn't existboolean getBoolean(String name, boolean defaultValue)
ClassCastException - if the JsonValue cannot be correctly castboolean isNull(String name)
JsonValue.NULLCopyright © 2010 - 2020 Adobe. All Rights Reserved