0

I've been searching through the Internet for a while, still have no idea what should I do... here's my code:

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

res contains following:

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

I just keep getting this error and don't know how to fix it, please help :C

travisspears
  • 59
  • 1
  • 1
  • 7

1 Answers1

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"]]
Vipul Purohit
  • 9,807
  • 6
  • 53
  • 76