// JSON object to hold the information, which is sent to the server
JSONObject jsonObjSend = new JSONObject();
jsonObjSend.put("action", "myAction");
jsonObjSend.put("type", tipo);
目前一切都很好,但如果我想添加
。jsonObjSend.put("elementi", arrayOfElements);
arrayOf Elements 必须是一个字符串数组。我该怎么做?
/** 编辑
我需要的示例
{
"action": "myAction",
"type": "elementi",
"elementi": [
"3287498357",
"23472857"
]
}