|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.hazelcast.util.JsonUtil
public final class JsonUtil
Utility class to deal with Json.
Method Summary | |
---|---|
static com.eclipsesource.json.JsonArray |
getArray(com.eclipsesource.json.JsonObject object,
String field)
Returns a field in a Json object as an array. |
static com.eclipsesource.json.JsonArray |
getArray(com.eclipsesource.json.JsonObject object,
String field,
com.eclipsesource.json.JsonArray defaultValue)
Returns a field in a Json object as an array. |
static boolean |
getBoolean(com.eclipsesource.json.JsonObject object,
String field)
Returns a field in a Json object as a boolean. |
static boolean |
getBoolean(com.eclipsesource.json.JsonObject object,
String field,
boolean defaultValue)
Returns a field in a Json object as a boolean. |
static double |
getDouble(com.eclipsesource.json.JsonObject object,
String field)
Returns a field in a Json object as a double. |
static double |
getDouble(com.eclipsesource.json.JsonObject object,
String field,
double defaultValue)
Returns a field in a Json object as a double. |
static float |
getFloat(com.eclipsesource.json.JsonObject object,
String field)
Returns a field in a Json object as a float. |
static float |
getFloat(com.eclipsesource.json.JsonObject object,
String field,
float defaultValue)
Returns a field in a Json object as a float. |
static int |
getInt(com.eclipsesource.json.JsonObject object,
String field)
Returns a field in a Json object as an int. |
static int |
getInt(com.eclipsesource.json.JsonObject object,
String field,
int defaultValue)
Returns a field in a Json object as an int. |
static long |
getLong(com.eclipsesource.json.JsonObject object,
String field)
Returns a field in a Json object as a long. |
static long |
getLong(com.eclipsesource.json.JsonObject object,
String field,
long defaultValue)
Returns a field in a Json object as a long. |
static com.eclipsesource.json.JsonObject |
getObject(com.eclipsesource.json.JsonObject object,
String field)
Returns a field in a Json object as an object. |
static com.eclipsesource.json.JsonObject |
getObject(com.eclipsesource.json.JsonObject object,
String field,
com.eclipsesource.json.JsonObject defaultValue)
Returns a field in a Json object as an object. |
static String |
getString(com.eclipsesource.json.JsonObject object,
String field)
Returns a field in a Json object as a string. |
static String |
getString(com.eclipsesource.json.JsonObject object,
String field,
String defaultValue)
Returns a field in a Json object as a string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static int getInt(com.eclipsesource.json.JsonObject object, String field)
object
- the Json Objectfield
- the field in the Json object to return
public static int getInt(com.eclipsesource.json.JsonObject object, String field, int defaultValue)
object
- the Json Objectfield
- the field in the Json object to returndefaultValue
- a default value for the field if the field value is null
public static long getLong(com.eclipsesource.json.JsonObject object, String field)
object
- the Json Objectfield
- the field in the Json object to return
public static long getLong(com.eclipsesource.json.JsonObject object, String field, long defaultValue)
object
- the Json Objectfield
- the field in the Json object to returndefaultValue
- a default value for the field if the field value is null
public static double getDouble(com.eclipsesource.json.JsonObject object, String field)
object
- the Json Objectfield
- the field in the Json object to return
public static double getDouble(com.eclipsesource.json.JsonObject object, String field, double defaultValue)
object
- the Json Objectfield
- the field in the Json object to returndefaultValue
- a default value for the field if the field value is null
public static float getFloat(com.eclipsesource.json.JsonObject object, String field)
object
- the Json Objectfield
- the field in the Json object to return
public static float getFloat(com.eclipsesource.json.JsonObject object, String field, float defaultValue)
object
- the Json Objectfield
- the field in the Json object to returndefaultValue
- a default value for the field if the field value is null
public static String getString(com.eclipsesource.json.JsonObject object, String field)
object
- the Json Objectfield
- the field in the Json object to return
public static String getString(com.eclipsesource.json.JsonObject object, String field, String defaultValue)
object
- the Json Objectfield
- the field in the Json object to returndefaultValue
- a default value for the field if the field value is null
public static boolean getBoolean(com.eclipsesource.json.JsonObject object, String field)
object
- the Json Objectfield
- the field in the Json object to return
public static boolean getBoolean(com.eclipsesource.json.JsonObject object, String field, boolean defaultValue)
object
- the Json Objectfield
- the field in the Json object to returndefaultValue
- a default value for the field if the field value is null
public static com.eclipsesource.json.JsonArray getArray(com.eclipsesource.json.JsonObject object, String field)
object
- the Json Objectfield
- the field in the Json object to return
public static com.eclipsesource.json.JsonArray getArray(com.eclipsesource.json.JsonObject object, String field, com.eclipsesource.json.JsonArray defaultValue)
object
- the Json Objectfield
- the field in the Json object to returndefaultValue
- a default value for the field if the field value is null
public static com.eclipsesource.json.JsonObject getObject(com.eclipsesource.json.JsonObject object, String field)
object
- the Json objectfield
- the field in the Json object to return
public static com.eclipsesource.json.JsonObject getObject(com.eclipsesource.json.JsonObject object, String field, com.eclipsesource.json.JsonObject defaultValue)
object
- the Json objectfield
- the field in the Json object to returndefaultValue
- a default value for the field if the field value is null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |