Class ResponseUtils

java.lang.Object
org.labkey.remoteapi.internal.ResponseUtils

public class ResponseUtils extends Object
  • Method Details

    • deepUnmodifiableMap

      public static Map<String,Object> deepUnmodifiableMap(org.json.JSONObject jsonObject)
      Convert JSON Object to map and make a thoroughly unmodifiable copy of that map.
      Any nested JSONObjects or JSONArrays will be similarly processed.
      Parameters:
      jsonObject - Map to copy
      Returns:
      Unmodifiable copy of the provided JSONObject.
      See Also:
      • JSONObject.toMap()
    • deepUnmodifiableMap

      public static Map<String,Object> deepUnmodifiableMap(Map<String,Object> map)
      Make a thoroughly unmodifiable copy of a Map that was generated by a JSONObject.
      Any nested Maps or Lists will be made unmodifiable.
      Parameters:
      map - Map to copy
      Returns:
      Unmodifiable copy of the provided Map
      See Also:
      • JSONObject.toMap()
    • deepUnmodifiableList

      public static List<Object> deepUnmodifiableList(List<Object> list)
      Make a thoroughly unmodifiable copy of a List that was generated by a JSONArray.
      Any nested Maps or Lists will also be made unmodifiable.
      Parameters:
      list - List to copy
      Returns:
      Unmodifiable copy of the provided Map
      See Also:
      • JSONArray.toList()