// JSON object to hold the information, which is sent to the server
JSONObject jsonObjSend = new JSONObject();
jsonObjSend.put("action", "myAction");
jsonObjSend.put("type", tipo);
For now is everything ok but if I want to add
jsonObjSend.put("elementi", arrayOfElements);
where arrayOf Elements must be an array of strings. How can I do?
/** EDIT
EXAMPLE OF WHAT I NEED
{
"action": "myAction",
"type": "elementi",
"elementi": [
"3287498357",
"23472857"
]
}
See Question&Answers more detail:os