判断字符串是JSONObject 还是JSONArray?

来源:互联网 发布:stc单片机最小系统 编辑:程序博客网 时间:2024/05/09 17:54
Object json = new JSONTokener(jsonResponse).nextValue();if (json instanceof JSONObject) {    JSONObject jsonObject = (JSONObject) json;} else if (json instanceof JSONArray){    JSONArray jsonArray = (JSONArray) json;    
阅读全文
0 0
原创粉丝点击