Object json = new JSONTokener(jsonResponse).nextValue(); if (json instanceof JSONObject) { JSONObject jsonObject = (JSONObject) json; } else if (json instanceof JSONArray){ JSONArray jsonArray = (JSONArray) json;
判断字符串是JSONObject 还是JSONArray?
最新推荐文章于 2025-02-21 09:07:15 发布