我已经在互联网上搜索了一段时间,仍然不知道该怎么做...这是我的代码:
String res = "...";
JSONArray jArr = new JSONArray(res);
res包含以下内容:
[["000000000001","club1","www.example.com","some adress"],["000000000002","club2","www.example.com","some adress2"]]
我只是不断收到此错误并且不知道如何修复它,请帮助:C
答案 0 :(得分:0)
我尝试了你的代码并且工作正常。这是我试过的代码:
String res = "[[\"000000000001\",\"club1\",\"www.example.com\",\"some adress\"],[\"000000000002\",\"club2\",\"www.example.com\",\"some adress2\"]]";
try {
jArr = new JSONArray(res);
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Log.e("Array", "" + jArr.toString());
这是输出:
[["000000000001","club1","www.example.com","some adress"],["000000000002","club2","www.example.com","some adress2"]]