Converting arraylist to JSON
问题 I have an android activity that receives an arraylist from a servlet. Example [stl1010, P3]. When I try to convert this to JSON Object (using the parser class) I get the exception "Error parsing data org.json.JSONException: Value ["stl1010","P3"] of type org.json.JSONArray cannot be converted to JSONObject." Below is the servlet code: private ArrayList<String> ticketLookup(String tkt) { Connection con = null; Statement st = null; //StringArray msga = new StringArray(); ArrayList<String> msga