Я получаю эту ошибку, используя модифицированный пост API.
Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 48 path $.data
Мой класс pojo дан ниже:
public class InFo_Post {
private String status;
private String msg;
private DataModel data;
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public DataModel getData() {
return data;
}
public void setData(DataModel data) {
this.data = data;
}
private class DataModel {
private String skill_years;
private String skill_where;
private String about_work;
private String skill_images;
public String getSkill_years() {
return skill_years;
}
public void setSkill_years(String skill_years) {
this.skill_years = skill_years;
}
public String getSkill_where() {
return skill_where;
}
public void setSkill_where(String skill_where) {
this.skill_where = skill_where;
}
public String getAbout_work() {
return about_work;
}
public void setAbout_work(String about_work) {
this.about_work = about_work;
}
public String getSkill_images() {
return skill_images;
}
public void setSkill_images(String skill_images) {
this.skill_images = skill_images;
}
}
}
Ответ дан ниже:
{
"status": "Success",
"msg": "Skill saved successfully. With 0 image. Failed to upload 1 image.",
"data": {
"skill_id": "3",
"user_id": "30",
"skill_years": "12",
"skill_where": "hjujjhj",
"about_work": "dvsvsdvds",
"skill_images": ""
}
}
Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 48 path $.data
Почему выдается эта ошибка?