code: @SuppressWarnings("unchecked")
      public static <T> List<T> jsonArrayToList(final JSONArray jsonArray) {
          if (null == jsonArray) {
              return Collections.emptyList();
          }
  
          final List<T> ret = new ArrayList<T>();
  
          for (int i = 0; i < jsonArray.length(); i++) {
              ret.add((T) jsonArray.opt(i));
          }
  
          return ret;
      }
docs: Converts the specified {@link JSONArray JSON array} to a
  {@link List list}.
  
  @param <T>       the type of elements maintained by the specified json array
  @param jsonArray the specified json array
  @return an {@link ArrayList array list}