15
JSON을 객체로 비 정렬 화하려고하면 GSON 오류가 발생합니다. 오류 (BEGIN_OBJECT이 (가) 예상되지만 행 3 열의 문자열 22에 있음)은 아래 입력의 3 행을 가리 킵니다.GSON : 예상 BEGIN_OBJECT이지만 STRING이었습니다
Bean과 관련하여 JSON을 올바르게 매핑하지 않았습니까?
import javax.xml.bind.JAXBElement;
public class BusinessPartnerCreate {
protected JAXBElement<String> partnerType;
protected Person person;
protected Company company;
protected String email;
protected String phone;
protected AddressData addressData;
protected AddressClean addressClean;
protected String city;
protected String state;
protected String zipCode;
protected JAXBElement<String> externalId;
}
그리고 내 입력 JSON 보이는
은 이것이다 :{
"business-partner-create": {
"partner-type": "1",
"person": {
"firstName": "Dirk",
"lastName": "Wintermill",
"title": ""
},
"email": "[email protected]",
"phone": "219-385-2946",
"addressClean": {
"house-number": "10218",
"street-name": "Park",
"street-abbr": "Rd"
},
"city": "Somerset",
"state": "NJ",
"zip-code": "01955"
}
}