Код: Выделить всё
{
"email_address": "testchimp@gmail.com",
"status": "subscribed",
"merge_fields": {
"FNAME": "testmailchimp",
"LNAME": "testingit",
}
}
Код: Выделить всё
@Override
protected Map getParams(){
Map params = new HashMap();
params.put("email_address","testchimp@gmail.com");
params.put("status","unsubscribed");
//here i want to add the arraylist FNAME and LNAME
return params;
}
Я решил свою проблему следующим образом:
Код: Выделить всё
final JSONObject jsonBody = new JSONObject("{\"email_address\":\"mailchimptester@gmail.com\"," +
"\"status\":\"unsubscribed\"," +
"\"merge_fields\":{\"FNAME\":\"test\",\"LNAME\":\"teste\"}}");
Подробнее здесь: https://stackoverflow.com/questions/482 ... t-into-map
Мобильная версия