【发布时间】:2017-09-13 02:13:17
【问题描述】:
我有像
这样的 json 数据格式{
"status":200,
"message":"ok",
"response": {"result":1, "time": 0.0123, "values":[1,1,0,0,0,0,0,0,0]
}
}
我想获取 values 数组的一个值并将其放在 Eclipse 中的 textView 上。在eclipse中查看我的代码
protected void onPostExecute (String result){
try {
JSONobject json = new JSONObject(result);
tv.setText(json.toString(1));
}catch (JSONException e){
e.printStackTrace();
}
}
【问题讨论】:
-
您的代码似乎缺少某些部分。
try在哪里,函数在哪里关闭?
标签: java android eclipse jsonparser