public ArrayList<String> convertJsonToJsonObject(){
ArrayList<String> mylist = new ArrayList<String> ();
mylist.add("abc");
mylist.add("cfd");
mylist.add("ert");
mylist.add("fg");
mylist.add("ujk");
mylist.add("wer");
mylist.add("dvb");
mylist.add("ert");
System.out.println("JSONObject :: "+(JSONObject)JSONSerializer.toJson(mylist));
I got an error in the .toJson () method, I'm not sure what the error I am making is.
source
share