try { JSONObject jsonObject = new JSONObject(standarData); Iterator it = jsonObject.keys(); int count = 0 ; while (it.hasNext()){ count ++; String temp = (String) it.next(); sb.append(temp+":"+jsonObject.getString(temp)) ; if (count == 2) break; sb.append("\n"); } } catch (JSONException e) { e.printStackTrace(); }
json转map
最新推荐文章于 2023-06-21 15:02:37 发布