Package org.brijframework.util.resouces
Class JSONUtil
- java.lang.Object
-
- org.brijframework.util.resouces.JSONUtil
-
public class JSONUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description JSONUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.json.JSONArraygetJSONArrayFromJSONString(String json)static org.json.JSONObjectgetJSONFromXML(String xml)static org.json.JSONObjectgetJSONObjectFromJSONString(String json)static ObjectgetJSONObjectFromObject(Object object)static StringgetJsonStringFromCollection(Collection<? extends Object> cache)static StringgetJsonStringFromMap(Map<?,?> cache)static StringgetJsonStringFromObject(Object cache)static List<Object>getList(org.json.JSONArray array)static List<Object>getListFromJSONArray(String json)static ArrayList<Object>getListFromJSONArray(org.json.JSONArray array)static Map<String,Object>getMap(org.json.JSONObject jsonObject)static HashMap<String,Object>getMapFromJSONObject(org.json.JSONObject object)static HashMap<String,Object>getMapFromJSONObject(org.json.JSONObject object, String key)static Map<String,Object>getMapFromJSONString(String json)static ObjectgetObjectFromJSON(Object json)static StringgetXMLFromJSON(Object obj)static <T> booleanisJDKClass(T t)static List<Object>toList(org.json.JSONArray array)static Map<String,Object>toMap(String json)static Map<?,?>toMap(org.json.JSONObject object)
-
-
-
Method Detail
-
isJDKClass
public static <T> boolean isJDKClass(T t)
-
getMapFromJSONObject
public static HashMap<String,Object> getMapFromJSONObject(org.json.JSONObject object, String key) throws org.json.JSONException
- Throws:
org.json.JSONException
-
getMapFromJSONObject
public static HashMap<String,Object> getMapFromJSONObject(org.json.JSONObject object) throws org.json.JSONException
- Throws:
org.json.JSONException
-
getListFromJSONArray
public static ArrayList<Object> getListFromJSONArray(org.json.JSONArray array) throws org.json.JSONException
- Throws:
org.json.JSONException
-
getObjectFromJSON
public static Object getObjectFromJSON(Object json) throws org.json.JSONException
- Throws:
org.json.JSONException
-
getJSONFromXML
public static org.json.JSONObject getJSONFromXML(String xml)
-
getJSONObjectFromJSONString
public static org.json.JSONObject getJSONObjectFromJSONString(String json)
-
getJSONArrayFromJSONString
public static org.json.JSONArray getJSONArrayFromJSONString(String json)
-
getJsonStringFromCollection
public static String getJsonStringFromCollection(Collection<? extends Object> cache)
-
toMap
public static Map<?,?> toMap(org.json.JSONObject object)
-
-