How can I post following parameter in retrofit through post method ?
\"params\":{\"body\": {
\"learning_objective_uuids\": [
\"ED4FE2BB2008FDA9C81
see this example where i need to pass registration fields data as json request
@POST("magento2apidemo/rest/V1/customers")
Call customerRegistration(@Body JsonObject registrationData);
here i have created registrationData is
private static JsonObject generateRegistrationRequest() {
JSONObject jsonObject = new JSONObject();
try {
JSONObject subJsonObject = new JSONObject();
subJsonObject.put("email", "abc@xyz.com");
subJsonObject.put("firstname", "abc");
subJsonObject.put("lastname", "xyz");
jsonObject.put("customer", subJsonObject);
jsonObject.put("password", "password");
} catch (JSONException e) {
e.printStackTrace();
}
JsonParser jsonParser = new JsonParser();
JsonObject gsonObject = (JsonObject) jsonParser.parse(jsonObject.toString());
return gsonObject;
}