I am writing an application to get the json object from server.
for example:
{"23423423", [abc, 2009-10-12, hello]}
My problem is:
if abc is a string that contains comma, then how can I parse the content in square brackets?
normally it should be three items in the square brackets. But if abc contains a comma, then I will get four items, which is not right.
Any ideas ?
Thanks in advance !
EDIT:
JSONObject obj = new JSONObject();
List list = new ArrayList();
list.add("abc");
list.add("2009-10");
obj.put("234234", list.toString());// don't use toString();
Finally I solve it, I should not use the list.toString(), otherwise the whole list will be converted to a string.