What's the difference?
Json object is demarcated by {} while json array is demarcated by [ ]. Yeah, it really was that trivial.
Here's the bit of code that I used to change my object to array
JSONArray json_array = new JSONArray();
json_array.put(json);
String params = "action=sync&phone="+phone+"&contacts="+json_array.toString();
No comments:
Post a Comment