I receiving json file i have created pojo class as well but while running my application it giveing me error "Expected BEGIN_ARRAY but was String"

i have tried everthing but nothing is helping

Here is my json data

 {
"Success": true,
"Message": "Device Not Found",
"Customer_Data": [{
    "customerid": 12365,
    "customername": "Mukesh SHARMA",
    "gender": "M",
    "personalcontact": 999999999,
    "homecontact": 999999999,
    "emailid": "[email protected]",
    "address": "RockStar",
    "designation": "Chief Life Insurance Advisor",
    "stateid": 22,
    "statename": "Uttar Pradesh",
    "cityid": 557,
    "cityname": "Sant Ravidas Nagar",
    "pincode": 221304,
    "birthdate": "14-11-1983",
    "marriagedate": "2018-01-01",
    "category": "-- Select --",
    "mdrttick": false,
    "profilepicture": "http://mdddddddtaupdate.in/profile_pic/12365.jpg",
    "branchname": "ModelTown",
    "branchcode": "123",
    "licbranchid": 20596,
    "division": "Delhi DO-II",
    "licdivisionentryid": 51,
    "password": "123456",
    "employeename": "Shahnawaz Khan",
    "empcontact": 999999999,
    "empmail": "[email protected]",
    "dealername": "Sachinder",
    "deacontact": 999999999,
    "deamail": "[email protected]",
    "club_member": "-- Select --",
    "lifeinsurance": false,
    "nonlife": false,
    "healthinsurance": false,
    "mutualfunds": false,
    "other": false,
    "efrom": "A",
    "edate": "2019-05-09 13:03:17.63214",
    "website": "",
    "maxdate": "01-01-2000 00:00:00"
}],
"Customer_Device": "",
"Customer_Event": "",
"All_Event": [{
    "event_id": 6,
    "event_name": "Test Event - 1",
    "start_date": "01/06/2019",
    "end_date": "02/06/2019",
    "address_1": "Mumbai",
    "address_2": "Mumbai",
    "location_link": "https://goo.gl/maps/vTia6DQxwmiA5kvz6",
    "pincode": 400060,
    "state_id": 10,
    "city_id": 355,
    "sechudel": "Test",
    "itinerary": "Test",
    "edate": "2019-05-09T17:00:05.95592",
    "eventimg": "http://zaidicorp.in/login/ProcessImage/636935218388448729.png"
}],
"Status": 2,
"Currentdate": "5/18/2019"
}

here is my json

package mytraining.com.mytraining.Pojo;

import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;

import java.io.Serializable;
import java.util.List;


public class OtpCheck implements Serializable {

    @SerializedName("Success")
    @Expose
    private Boolean success;
    @SerializedName("Message")
    @Expose
    private String message;
    @SerializedName("Customer_Data")
    @Expose
    private List<CustomerData> customerData = null;
    @SerializedName("Customer_Device")
    @Expose
    private String customerDevice;
    @SerializedName("Customer_Event")
    @Expose
    private String customerEvent;
    @SerializedName("All_Event")
    @Expose
    private List<EventDetail> getEventDetails = null;
    @SerializedName("Status")
    @Expose
    private Integer status;
    @SerializedName("Currentdate")
    @Expose
    private String currentdate;

    public Boolean getSuccess() {
        return success;
    }

    public void setSuccess(Boolean success) {
        this.success = success;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public List<CustomerData> getCustomerData() {
        return customerData;
    }

    public void setCustomerData(List<CustomerData> customerData) {
        this.customerData = customerData;
    }

    public String getCustomerDevice() {
        return customerDevice;
    }

    public void setCustomerDevice(String customerDevice) {
        this.customerDevice = customerDevice;
    }

    public String getCustomerEvent() {
        return customerEvent;
    }

    public void setCustomerEvent(String customerEvent) {
        this.customerEvent = customerEvent;
    }

    public List<EventDetail> getEventDetails() {
        return getEventDetails;
    }

    public void setEventDetails(List<EventDetail> getEventDetails) {
        this.getEventDetails = getEventDetails;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getCurrentdate() {
        return currentdate;
    }

    public void setCurrentdate(String currentdate) {
        this.currentdate = currentdate;
    }

    public static class EventDetail implements Serializable {

        @SerializedName("event_id")
        @Expose
        private Integer eventId;
        @SerializedName("event_name")
        @Expose
        private String eventName;
        @SerializedName("start_date")
        @Expose
        private String startDate;
        @SerializedName("end_date")
        @Expose
        private String endDate;
        @SerializedName("address_1")
        @Expose
        private String address1;
        @SerializedName("address_2")
        @Expose
        private String address2;
        @SerializedName("location_link")
        @Expose
        private String locationLink;
        @SerializedName("pincode")
        @Expose
        private Integer pincode;
        @SerializedName("state_id")
        @Expose
        private Integer stateId;
        @SerializedName("city_id")
        @Expose
        private Integer cityId;
        @SerializedName("sechudel")
        @Expose
        private String sechudel;
        @SerializedName("itinerary")
        @Expose
        private String itinerary;
        @SerializedName("edate")
        @Expose
        private String edate;
        @SerializedName("eventimg")
        @Expose
        private String eventimg;

        public Integer getEventId() {
            return eventId;
        }

        public void setEventId(Integer eventId) {
            this.eventId = eventId;
        }

        public String getEventName() {
            return eventName;
        }

        public void setEventName(String eventName) {
            this.eventName = eventName;
        }

        public String getStartDate() {
            return startDate;
        }

        public void setStartDate(String startDate) {
            this.startDate = startDate;
        }

        public String getEndDate() {
            return endDate;
        }

        public void setEndDate(String endDate) {
            this.endDate = endDate;
        }

        public String getAddress1() {
            return address1;
        }

        public void setAddress1(String address1) {
            this.address1 = address1;
        }

        public String getAddress2() {
            return address2;
        }

        public void setAddress2(String address2) {
            this.address2 = address2;
        }

        public String getLocationLink() {
            return locationLink;
        }

        public void setLocationLink(String locationLink) {
            this.locationLink = locationLink;
        }

        public Integer getPincode() {
            return pincode;
        }

        public void setPincode(Integer pincode) {
            this.pincode = pincode;
        }

        public Integer getStateId() {
            return stateId;
        }

        public void setStateId(Integer stateId) {
            this.stateId = stateId;
        }

        public Integer getCityId() {
            return cityId;
        }

        public void setCityId(Integer cityId) {
            this.cityId = cityId;
        }

        public String getSechudel() {
            return sechudel;
        }

        public void setSechudel(String sechudel) {
            this.sechudel = sechudel;
        }

        public String getItinerary() {
            return itinerary;
        }

        public void setItinerary(String itinerary) {
            this.itinerary = itinerary;
        }

        public String getEdate() {
            return edate;
        }

        public void setEdate(String edate) {
            this.edate = edate;
        }

        public String getEventimg() {
            return eventimg;
        }

        public void setEventimg(String eventimg) {
            this.eventimg = eventimg;
        }
    }

    public static class CustomerData implements Serializable {

        @SerializedName("customerid")
        @Expose
        private Integer customerid;
        @SerializedName("customername")
        @Expose
        private String customername;
        @SerializedName("gender")
        @Expose
        private String gender;
        @SerializedName("personalcontact")
        @Expose
        private Integer personalcontact;
        @SerializedName("homecontact")
        @Expose
        private Integer homecontact;
        @SerializedName("emailid")
        @Expose
        private String emailid;
        @SerializedName("address")
        @Expose
        private String address;
        @SerializedName("designation")
        @Expose
        private String designation;
        @SerializedName("stateid")
        @Expose
        private Integer stateid;
        @SerializedName("statename")
        @Expose
        private String statename;
        @SerializedName("cityid")
        @Expose
        private Integer cityid;
        @SerializedName("cityname")
        @Expose
        private String cityname;
        @SerializedName("pincode")
        @Expose
        private Integer pincode;
        @SerializedName("birthdate")
        @Expose
        private String birthdate;
        @SerializedName("marriagedate")
        @Expose
        private String marriagedate;
        @SerializedName("category")
        @Expose
        private String category;
        @SerializedName("mdrttick")
        @Expose
        private Boolean mdrttick;
        @SerializedName("profilepicture")
        @Expose
        private String profilepicture;
        @SerializedName("branchname")
        @Expose
        private String branchname;
        @SerializedName("branchcode")
        @Expose
        private String branchcode;
        @SerializedName("licbranchid")
        @Expose
        private Integer licbranchid;
        @SerializedName("division")
        @Expose
        private String division;
        @SerializedName("licdivisionentryid")
        @Expose
        private Integer licdivisionentryid;
        @SerializedName("password")
        @Expose
        private String password;
        @SerializedName("employeename")
        @Expose
        private String employeename;
        @SerializedName("empcontact")
        @Expose
        private Integer empcontact;
        @SerializedName("empmail")
        @Expose
        private String empmail;
        @SerializedName("dealername")
        @Expose
        private String dealername;
        @SerializedName("deacontact")
        @Expose
        private Integer deacontact;
        @SerializedName("deamail")
        @Expose
        private String deamail;
        @SerializedName("club_member")
        @Expose
        private String clubMember;
        @SerializedName("lifeinsurance")
        @Expose
        private Boolean lifeinsurance;
        @SerializedName("nonlife")
        @Expose
        private Boolean nonlife;
        @SerializedName("healthinsurance")
        @Expose
        private Boolean healthinsurance;
        @SerializedName("mutualfunds")
        @Expose
        private Boolean mutualfunds;
        @SerializedName("other")
        @Expose
        private Boolean other;
        @SerializedName("efrom")
        @Expose
        private String efrom;
        @SerializedName("edate")
        @Expose
        private String edate;
        @SerializedName("website")
        @Expose
        private String website;
        @SerializedName("maxdate")
        @Expose
        private String maxdate;

        public Integer getCustomerid() {
            return customerid;
        }

        public void setCustomerid(Integer customerid) {
            this.customerid = customerid;
        }

        public String getCustomername() {
            return customername;
        }

        public void setCustomername(String customername) {
            this.customername = customername;
        }

        public String getGender() {
            return gender;
        }

        public void setGender(String gender) {
            this.gender = gender;
        }

        public Integer getPersonalcontact() {
            return personalcontact;
        }

        public void setPersonalcontact(Integer personalcontact) {
            this.personalcontact = personalcontact;
        }

        public Integer getHomecontact() {
            return homecontact;
        }

        public void setHomecontact(Integer homecontact) {
            this.homecontact = homecontact;
        }

        public String getEmailid() {
            return emailid;
        }

        public void setEmailid(String emailid) {
            this.emailid = emailid;
        }

        public String getAddress() {
            return address;
        }

        public void setAddress(String address) {
            this.address = address;
        }

        public String getDesignation() {
            return designation;
        }

        public void setDesignation(String designation) {
            this.designation = designation;
        }

        public Integer getStateid() {
            return stateid;
        }

        public void setStateid(Integer stateid) {
            this.stateid = stateid;
        }

        public String getStatename() {
            return statename;
        }

        public void setStatename(String statename) {
            this.statename = statename;
        }

        public Integer getCityid() {
            return cityid;
        }

        public void setCityid(Integer cityid) {
            this.cityid = cityid;
        }

        public String getCityname() {
            return cityname;
        }

        public void setCityname(String cityname) {
            this.cityname = cityname;
        }

        public Integer getPincode() {
            return pincode;
        }

        public void setPincode(Integer pincode) {
            this.pincode = pincode;
        }

        public String getBirthdate() {
            return birthdate;
        }

        public void setBirthdate(String birthdate) {
            this.birthdate = birthdate;
        }

        public String getMarriagedate() {
            return marriagedate;
        }

        public void setMarriagedate(String marriagedate) {
            this.marriagedate = marriagedate;
        }

        public String getCategory() {
            return category;
        }

        public void setCategory(String category) {
            this.category = category;
        }

        public Boolean getMdrttick() {
            return mdrttick;
        }

        public void setMdrttick(Boolean mdrttick) {
            this.mdrttick = mdrttick;
        }

        public String getProfilepicture() {
            return profilepicture;
        }

        public void setProfilepicture(String profilepicture) {
            this.profilepicture = profilepicture;
        }

        public String getBranchname() {
            return branchname;
        }

        public void setBranchname(String branchname) {
            this.branchname = branchname;
        }

        public String getBranchcode() {
            return branchcode;
        }

        public void setBranchcode(String branchcode) {
            this.branchcode = branchcode;
        }

        public Integer getLicbranchid() {
            return licbranchid;
        }

        public void setLicbranchid(Integer licbranchid) {
            this.licbranchid = licbranchid;
        }

        public String getDivision() {
            return division;
        }

        public void setDivision(String division) {
            this.division = division;
        }

        public Integer getLicdivisionentryid() {
            return licdivisionentryid;
        }

        public void setLicdivisionentryid(Integer licdivisionentryid) {
            this.licdivisionentryid = licdivisionentryid;
        }

        public String getPassword() {
            return password;
        }

        public void setPassword(String password) {
            this.password = password;
        }

        public String getEmployeename() {
            return employeename;
        }

        public void setEmployeename(String employeename) {
            this.employeename = employeename;
        }

        public Integer getEmpcontact() {
            return empcontact;
        }

        public void setEmpcontact(Integer empcontact) {
            this.empcontact = empcontact;
        }

        public String getEmpmail() {
            return empmail;
        }

        public void setEmpmail(String empmail) {
            this.empmail = empmail;
        }

        public String getDealername() {
            return dealername;
        }

        public void setDealername(String dealername) {
            this.dealername = dealername;
        }

        public Integer getDeacontact() {
            return deacontact;
        }

        public void setDeacontact(Integer deacontact) {
            this.deacontact = deacontact;
        }

        public String getDeamail() {
            return deamail;
        }

        public void setDeamail(String deamail) {
            this.deamail = deamail;
        }

        public String getClubMember() {
            return clubMember;
        }

        public void setClubMember(String clubMember) {
            this.clubMember = clubMember;
        }

        public Boolean getLifeinsurance() {
            return lifeinsurance;
        }

        public void setLifeinsurance(Boolean lifeinsurance) {
            this.lifeinsurance = lifeinsurance;
        }

        public Boolean getNonlife() {
            return nonlife;
        }

        public void setNonlife(Boolean nonlife) {
            this.nonlife = nonlife;
        }

        public Boolean getHealthinsurance() {
            return healthinsurance;
        }

        public void setHealthinsurance(Boolean healthinsurance) {
            this.healthinsurance = healthinsurance;
        }

        public Boolean getMutualfunds() {
            return mutualfunds;
        }

        public void setMutualfunds(Boolean mutualfunds) {
            this.mutualfunds = mutualfunds;
        }

        public Boolean getOther() {
            return other;
        }

        public void setOther(Boolean other) {
            this.other = other;
        }

        public String getEfrom() {
            return efrom;
        }

        public void setEfrom(String efrom) {
            this.efrom = efrom;
        }

        public String getEdate() {
            return edate;
        }

        public void setEdate(String edate) {
            this.edate = edate;
        }

        public String getWebsite() {
            return website;
        }

        public void setWebsite(String website) {
            this.website = website;
        }

        public String getMaxdate() {
            return maxdate;
        }

        public void setMaxdate(String maxdate) {
            this.maxdate = maxdate;
        }
    }
}

0 Answers