Class JSONHelper


  • public class JSONHelper
    extends java.lang.Object
    Helper json methods that don't belong in JSON
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.List<java.lang.Object> jsonArrayToArray​(JSONArray array)  
      static java.util.Map<java.lang.String,​java.lang.Object> jsonObjectToMap​(JSONObject object)  
      static java.lang.Object jsonObjectToObject​(java.lang.Object object)
      Transforms JSONObject and JSONArray to Map and Iterable If transformation is not needed, returns the original object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • jsonObjectToObject

        public static java.lang.Object jsonObjectToObject​(java.lang.Object object)
                                                   throws JSONException
        Transforms JSONObject and JSONArray to Map and Iterable 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