private static Object parseJSONObj(Object obj) {

        Object result = null;
        if (obj == null) {
            // error
            return null;
        } else {
            if (obj instanceof JSONArray) {
                JSONArray arrayObj = (JSONArray) obj;
                List<Object> list = new ArrayList<Object>();
                for (Object element : arrayObj.toArray()) {
                    list.add(JsonUtil.parseJSONObj(element));
                }
                result = list;
            } else if (obj instanceof JSONObject) {
                JSONObject jsonObj = (JSONObject) obj;
                Map<String, Object> map = new HashMap<String, Object>();
                for (Object key : jsonObj.keySet()) {
                    map.put(key.toString(), JsonUtil.parseJSONObj(jsonObj.get(key.toString())));
                }
                return map;
            } else {
                result = obj;
            }
        }
        return result;
    }