| Modifier and Type | Interface and Description |
|---|---|
static class |
IJsonObject.KeyNotFoundException
Exception thrown when a
key is not found on a IJsonObject object. |
| Modifier and Type | Method and Description |
|---|---|
Object |
get(String key)
Gets a property.
|
Object |
get(String key,
Object defaultValue)
Gets a property.
|
BigDecimal |
getBigDecimal(String key)
Gets a property as
BigDecimal. |
BigDecimal |
getBigDecimal(String key,
BigDecimal defaultValue)
Gets a property as
BigDecimal. |
Boolean |
getBoolean(String key)
Gets a property as
Boolean. |
Boolean |
getBoolean(String key,
Boolean defaultValue)
Gets a property as
Boolean. |
byte[] |
getBytesFromBase64String(String key)
Gets a byte array, from a base 64 encoded property.
|
byte[] |
getBytesFromBase64String(String key,
byte[] defaultValue)
Gets a byte array, from a base 64 encoded property.
|
Date |
getDate(String key)
Gets a UTC timezoned date from a
ISO 8601 date property. |
Date |
getDate(String key,
Date defaultValue)
Gets a UTC timezoned date from a
ISO 8601 date property. |
Double |
getDouble(String key)
Gets a property as
Double. |
Double |
getDouble(String key,
Double defaultValue)
Gets a property as
Double. |
Float |
getFloat(String key)
Gets a property as
Float. |
Float |
getFloat(String key,
Float defaultValue)
Gets a property as
Float. |
Integer |
getInteger(String key)
Gets a property as
Integer. |
Integer |
getInteger(String key,
Integer defaultValue)
Gets a property as
Integer. |
IJsonArray |
getJsonArray(String key)
Gets a property as
IJsonArray. |
IJsonArray |
getJsonArray(String key,
IJsonArray defaultValue)
Gets a property as
IJsonArray. |
IJsonObject |
getJsonObject(String key)
Gets a property as
IJsonObject. |
IJsonObject |
getJsonObject(String key,
IJsonObject defaultValue)
Gets a property as
IJsonObject. |
Long |
getLong(String key)
Gets a property as
Long. |
Long |
getLong(String key,
Long defaultValue)
Gets a property as
Long. |
String |
getString(String key)
Gets a property as
String. |
String |
getString(String key,
String defaultValue)
Gets a property as
String. |
Map<String,Object> |
getUnderlyingMap()
The underlying map.
|
boolean |
isKeyExists(String key)
Does the object contain the specified key?
|
void |
put(String key,
Object value)
Adds a property to the object.
|
void |
remove(String key)
Removes a property from the object.
|
void |
removeAll()
Removes all properties from the object.
|
String |
toJsonString()
Gets the
Json String representation of the object. |
String |
toJsonString(boolean pretty)
Gets the
Json String representation of the object. |
forEach, iterator, spliteratorvoid remove(String key)
void removeAll()
boolean isKeyExists(String key)
Object get(String key) throws IJsonObject.KeyNotFoundException
null if not found.IJsonObject.KeyNotFoundExceptionObject get(String key, Object defaultValue)
defaultValue if not found.IJsonObject getJsonObject(String key) throws IJsonObject.KeyNotFoundException
IJsonObject.null if not found.IJsonObject.KeyNotFoundExceptionIJsonObject getJsonObject(String key, IJsonObject defaultValue)
IJsonObject.defaultValue if not found.IJsonArray getJsonArray(String key) throws IJsonObject.KeyNotFoundException
IJsonArray.null if not found.IJsonObject.KeyNotFoundExceptionIJsonArray getJsonArray(String key, IJsonArray defaultValue)
IJsonArray.defaultValue if not found.String getString(String key) throws IJsonObject.KeyNotFoundException
String.null if not found.IJsonObject.KeyNotFoundExceptionString getString(String key, String defaultValue)
String.defaultValue if not found.Integer getInteger(String key) throws IJsonObject.KeyNotFoundException
Integer.null if not found.IJsonObject.KeyNotFoundExceptionInteger getInteger(String key, Integer defaultValue)
Integer.defaultValue if not found.Long getLong(String key) throws IJsonObject.KeyNotFoundException
Long.null if not found.IJsonObject.KeyNotFoundExceptionLong getLong(String key, Long defaultValue)
Long.defaultValue if not found.Float getFloat(String key) throws IJsonObject.KeyNotFoundException
Float.null if not found.IJsonObject.KeyNotFoundExceptionFloat getFloat(String key, Float defaultValue)
Float.defaultValue if not found.Double getDouble(String key) throws IJsonObject.KeyNotFoundException
Double.null if not found.IJsonObject.KeyNotFoundExceptionDouble getDouble(String key, Double defaultValue)
Double.defaultValue if not found.Boolean getBoolean(String key) throws IJsonObject.KeyNotFoundException
Boolean.null if not found.IJsonObject.KeyNotFoundExceptionBoolean getBoolean(String key, Boolean defaultValue)
Boolean.defaultValue if not found.BigDecimal getBigDecimal(String key) throws IJsonObject.KeyNotFoundException
BigDecimal.null if not found.IJsonObject.KeyNotFoundExceptionBigDecimal getBigDecimal(String key, BigDecimal defaultValue)
BigDecimal.defaultValue if not found.byte[] getBytesFromBase64String(String key) throws IJsonObject.KeyNotFoundException
null if not found.IJsonObject.KeyNotFoundExceptionbyte[] getBytesFromBase64String(String key, byte[] defaultValue)
defaultValue if not found.Date getDate(String key) throws IJsonObject.KeyNotFoundException
ISO 8601 date property.null if not found.IJsonObject.KeyNotFoundExceptionDate getDate(String key, Date defaultValue)
ISO 8601 date property.defaultValue if not found.String toJsonString()
Json String representation of the object.String toJsonString(boolean pretty)
Json String representation of the object.pretty - ff true, the generated String will be formatted.Copyright © 2016. All rights reserved.