Object json = new JSONTokener(jsonResponse).nextValue(); if (json instanceof JSONObject) { JSONObject jsonObject = (JSONObject) json; } else if (json instanceof JSONArray){ JSONArray jsonArray = (JSONArray) json;
Determine whether the string is JSONObject or JSONArray?
Guess you like
Origin blog.csdn.net/jiabaokang/article/details/75579008
Recommended
Ranking