Class OrgJsonUtil


  • public class OrgJsonUtil
    extends java.lang.Object
    Utility class simplifying working with org.json.JSONObject and JSONArray in a way that it also works on android.
    • Method Summary

      Modifier and Type Method Description
      static java.lang.String[] getNames​(org.json.JSONObject obj)  
      static java.util.List<java.lang.Object> toList​(org.json.JSONArray arr)
      Used as a replacement of JSONArray#toList() (which doesn't exist in the android version of org.json).
      static java.util.Map<java.lang.String,​java.lang.Object> toMap​(org.json.JSONObject obj)
      Used as a replacement of JSONObject#toMap() (which doesn't exist in the android version of org.json).
      • Methods inherited from class java.lang.Object

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

      • toMap

        public static java.util.Map<java.lang.String,​java.lang.Object> toMap​(org.json.JSONObject obj)
        Used as a replacement of JSONObject#toMap() (which doesn't exist in the android version of org.json).
      • toList

        public static java.util.List<java.lang.Object> toList​(org.json.JSONArray arr)
        Used as a replacement of JSONArray#toList() (which doesn't exist in the android version of org.json).
      • getNames

        public static java.lang.String[] getNames​(org.json.JSONObject obj)