net.csdn.modules.http
Class JSONObjectUtils
java.lang.Object
net.csdn.modules.http.JSONObjectUtils
public class JSONObjectUtils
- extends Object
BlogInfo: william
Date: 11-9-7
Time: 上午11:22
|
Method Summary |
static boolean |
checkExists(net.sf.json.JSONObject object,
String key)
|
static boolean |
getBoolean(net.sf.json.JSONObject obj,
String key,
boolean... default_value)
|
static double |
getDouble(net.sf.json.JSONObject obj,
String key,
double... default_value)
|
static float |
getFloat(net.sf.json.JSONObject obj,
String key,
float... default_value)
|
static int |
getInt(net.sf.json.JSONObject obj,
String key,
int... default_value)
|
static net.sf.json.JSONArray |
getJSONArray(net.sf.json.JSONObject obj,
String key,
net.sf.json.JSONArray... default_value)
|
static net.sf.json.JSONObject |
getJSONObject(net.sf.json.JSONObject obj,
String key,
net.sf.json.JSONObject... default_value)
|
static long |
getLong(net.sf.json.JSONObject obj,
String key,
long... default_value)
|
static String |
getString(net.sf.json.JSONObject obj,
String key,
String... default_value)
|
static net.sf.json.JSONObject |
newJSONObject(Map map)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JSONObjectUtils
public JSONObjectUtils()
newJSONObject
public static net.sf.json.JSONObject newJSONObject(Map map)
checkExists
public static boolean checkExists(net.sf.json.JSONObject object,
String key)
getInt
public static int getInt(net.sf.json.JSONObject obj,
String key,
int... default_value)
getJSONObject
public static net.sf.json.JSONObject getJSONObject(net.sf.json.JSONObject obj,
String key,
net.sf.json.JSONObject... default_value)
getJSONArray
public static net.sf.json.JSONArray getJSONArray(net.sf.json.JSONObject obj,
String key,
net.sf.json.JSONArray... default_value)
getFloat
public static float getFloat(net.sf.json.JSONObject obj,
String key,
float... default_value)
getDouble
public static double getDouble(net.sf.json.JSONObject obj,
String key,
double... default_value)
getLong
public static long getLong(net.sf.json.JSONObject obj,
String key,
long... default_value)
getBoolean
public static boolean getBoolean(net.sf.json.JSONObject obj,
String key,
boolean... default_value)
getString
public static String getString(net.sf.json.JSONObject obj,
String key,
String... default_value)
Copyright © 2014. All Rights Reserved.