public final class MesosferObject
extends org.json.JSONObject
JSONObject
with some additional method. Just like JSONObject
,
MesosferObject
is a modifiable set of name/value mappings. Names are unique, non-null strings.
Values may be any mix of JSONObjects
, JSONArrays
, Strings, Booleans, Integers, Longs, Dates, Doubles or JSONObject.NULL
.
Values may not be null
, NaNs
, infinities
, or of any type not listed here.Modifier and Type | Class and Description |
---|---|
static class |
MesosferObject.Type
The enum of object type that supported by Mesosfer cloud.
|
Modifier and Type | Method and Description |
---|---|
java.util.Date |
getDate(java.lang.String name)
Returns the
Date value mapped by name if it exists, coercing it if
necessary, or throws if no such mapping exists. |
java.util.Date |
optDate(java.lang.String name)
Returns the
Date value mapped by name if it exists, coercing it if
necessary, or the empty string if no such mapping exists. |
java.util.Date |
optDate(java.lang.String name,
java.util.Date fallback)
Returns the
Date value mapped by name if it exists, coercing it if
necessary, or fallback if no such mapping exists. |
accumulate, get, getBoolean, getDouble, getInt, getJSONArray, getJSONObject, getLong, getString, has, isNull, keys, length, names, numberToString, opt, optBoolean, optBoolean, optDouble, optDouble, optInt, optInt, optJSONArray, optJSONObject, optLong, optLong, optString, optString, put, put, put, put, put, putOpt, quote, remove, toJSONArray, toString, toString, wrap
public java.util.Date getDate(java.lang.String name) throws org.json.JSONException
Date
value mapped by name
if it exists, coercing it if
necessary, or throws if no such mapping exists.org.json.JSONException
- if no such mapping exists.public java.util.Date optDate(java.lang.String name)
Date
value mapped by name
if it exists, coercing it if
necessary, or the empty string if no such mapping exists.public java.util.Date optDate(java.lang.String name, java.util.Date fallback)
Date
value mapped by name
if it exists, coercing it if
necessary, or fallback
if no such mapping exists.