【发布时间】:2017-10-11 13:18:43
【问题描述】:
我不知道我在这里做错了什么:
public void createArchive(ArrayList<String> worklogIssue) throws IOException {
String id = null;
int i = 0;
JSONArray json = new JSONArray(worklogIssue);
for (i = 0; i < worklogIssue.size(); i++){
JSONObject json_obj = json.getJSONObject(i);
id = json_obj.getString("id");
}
}
我收到此错误:JSONArray[0] 不是 JSONObject。
有谁知道我做错了什么?
worklogIssue = 数组列表。
谢谢
【问题讨论】:
-
您的 JSON 输入在哪里?该问题也应标记为
Java。