I am trying to load a .json file using loadJSONArray in Android mode but I keep getting a "cannot find symbol" error.
Everything works fine in Java mode...
As a newbie I have no idea why loadJSONArray doesn't work on Android but there is a work-around. Load the JSON as strings and then parse it afterwards like this:
String lines[] = loadStrings("your JSON URL in here");
JSONArray json = JSONArray.parse(lines[0]);
Answers
I have the same error gtrianta. I hope someone comes up with a fix. I have been pondering over it for days now. . . :(
As a newbie I have no idea why loadJSONArray doesn't work on Android but there is a work-around. Load the JSON as strings and then parse it afterwards like this: String lines[] = loadStrings("your JSON URL in here"); JSONArray json = JSONArray.parse(lines[0]);