Class DataUtils

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

public class DataUtils extends Object
Utility class for data manipulation.
  • 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.