Package com.castlabs.android.utils

# Class DataUtils

java.lang.Object
com.castlabs.android.utils.DataUtils

public class DataUtils extends Object
Utility class for data manipulation.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static JSONObject`
  `bundleToJSON(Bundle bundle)`
  Converts a Bundle to a JSONObject.
  `static Bundle`
  `JSONtoBundle(JSONObject json)`
  Converts a JSONObject to a Bundle.

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### JSONtoBundle

    @NonNull public static Bundle JSONtoBundle(@Nullable JSONObject json) throws JSONException
    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

    @NonNull public static JSONObject bundleToJSON(@Nullable Bundle bundle)
    Converts a Bundle to a JSONObject.
    Parameters:
      `bundle` - The Bundle to convert.
    Returns:
      A JSONObject representing the Bundle.