Package com.batch.android.json
Class JSONHelper
java.lang.Object
com.batch.android.json.JSONHelper
Helper json methods that don't belong in
JSON
-
Method Summary
Modifier and TypeMethodDescriptionjsonArrayToArray
(JSONArray array) jsonObjectToMap
(JSONObject object) static Object
jsonObjectToObject
(Object object) TransformsJSONObject
andJSONArray
toMap
andIterable
If transformation is not needed, returns the original object.
-
Method Details
-
jsonObjectToObject
TransformsJSONObject
andJSONArray
toMap
andIterable
If 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
- Throws:
JSONException
-
jsonArrayToArray
- Throws:
JSONException
-