Package com.castlabs.android.utils
Class DataUtils
java.lang.Object
com.castlabs.android.utils.DataUtils
Utility class for data manipulation.
-
Method Summary
Modifier and TypeMethodDescriptionstatic JSONObjectbundleToJSON(Bundle bundle) Converts a Bundle to a JSONObject.static BundleJSONtoBundle(JSONObject json) Converts a JSONObject to a Bundle.
-
Method Details
-
JSONtoBundle
Converts a JSONObject to a Bundle.- Parameters:
json- The JSONObject to convert.- Returns:
- A Bundle representing the JSONObject.
- Throws:
JSONException- If there is an error during JSON parsing.
-
bundleToJSON
Converts a Bundle to a JSONObject.- Parameters:
bundle- The Bundle to convert.- Returns:
- A JSONObject representing the Bundle.
-