0

我已经在互联网上搜索了一段时间,仍然不知道该怎么办......这是我的代码:

String res = "...";
        JSONArray jArr = new JSONArray(res);

res 包含以下内容:

[["000000000001","club1","www.example.com","some adress"],["000000000002","club2","www.example.com","some adress2"]]

我只是不断收到此错误,不知道如何解决,请帮助:C

4

1 回答 1

0

I tried your code and its working fine. Here is the code I tried :

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());

and here is the output :

[["000000000001","club1","www.example.com","some adress"],["000000000002","club2","www.example.com","some adress2"]]
于 2013-08-29T09:23:29.290 回答