Package com.batch.android.json
Class JSONHelper
- java.lang.Object
-
- com.batch.android.json.JSONHelper
-
public class JSONHelper extends java.lang.ObjectHelper json methods that don't belong inJSON
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.List<java.lang.Object>jsonArrayToArray(JSONArray array)static java.util.Map<java.lang.String,java.lang.Object>jsonObjectToMap(JSONObject object)static java.lang.ObjectjsonObjectToObject(java.lang.Object object)TransformsJSONObjectandJSONArraytoMapandIterableIf transformation is not needed, returns the original object.
-
-
-
Method Detail
-
jsonObjectToObject
public static java.lang.Object jsonObjectToObject(java.lang.Object object) throws JSONExceptionTransformsJSONObjectandJSONArraytoMapandIterableIf transformation is not needed, returns the original object. Useful for JSON deserialization- Parameters:
object- Object to transform- Returns:
- Transformed object, if necessary
- Throws:
JSONException
-
jsonObjectToMap
public static java.util.Map<java.lang.String,java.lang.Object> jsonObjectToMap(JSONObject object) throws JSONException
- Throws:
JSONException
-
jsonArrayToArray
public static java.util.List<java.lang.Object> jsonArrayToArray(JSONArray array) throws JSONException
- Throws:
JSONException
-
-