Ich habe Probleme beim Aktualisieren des Objekts in Sales Force mit Force API.Die Instanz von Boolean kann nicht aus VALUE_STRING-Wert deserialisiert werden. Ja oder Anforderung fehlt möglicherweise ein erforderliches Feld.
Objekt, das ich aktualisieren werde:
{id=null, accountId=null, contactId=null, status=STATUS_COMPLETED, category=null, type=null, createdDate=null, origin=null, submittedDate=null, paperDeclarationRequested=false, targetPolicy=null, policyNumber=null, caseStatus=STATUS_COMPLETED, recordType=null, sdpStatus=null, dipDate=null, unabletoLinkDate=null, currentDate=null, recordTypeId=null, investmentFundName=SBI Fund, dateOfLatestConsent=Fri Jun 17 05:30:00 IST 2016, dataConsentIndicator=true, subject=null, paperDocumentsRequested=true, title=Personal Details, firstName=Asif, surname=Billa, dateOfBirth=Thu Oct 25 05:30:00 IST 1990, nationalInsuranceNumber=123456, countryOfNationality=India, ukResidentIndicator=Yes, crownServiceOrArmedForcesEmployeeIndicator=crownService, countryOfTaxResidency=United Kingdom, taxReferenceNumber=wert234, townOfBirth=London, nonUkResidentIndicator=Yes, addressLine1=yemlur, addressLine2=abc, addressLine3=karnataka, town=London, country=United Kingdom, postCode=B46 5EW, previousAddressLine1=null, previousAddressLine2=null, previousAddressLine3=null, previousTown=null, previousCountry=null, previousPostCode=null, contactTelephoneNumber=123345, accountName=Prashant, accountNumber=123142342, buildingSocietyRollNumber=12345, sortCode=null, singlePaymentAmount=5000, regularMonthlyPaymentAmount=5000, regularMonthlyPaymentStartDate=Thu May 26 04:04:51 IST 2016, withdrawalAmount=5000, frequency=Monthly, withdrawalStartDate=Thu May 26 04:04:51 IST 2016, declarationsAccepted=true, declarationsAcceptedDate=Thu May 26 04:04:51 IST 2016, directDebitDocumentName=null}
Ausnahme, die ich erhalte ist:
com.force.api.ApiException: [{"message":"Cannot deserialize instance of boolean from VALUE_STRING value Yes or request may be missing a required field at [line:1, column:448]","errorCode":"JSON_PARSER_ERROR"}]
Bei der angegebenen Zeile & Spalte, die Eigenschaft ist eine Boolesche & ich wahr bin mit als Wert da drüben, also sollte es im Idealfall keine Probleme geben. Bitte
helfen
Sind Sie sicher, dass der JSON gültig ist? Wie erzeugst du es? –
Der Fehler besagt, dass er einen JSON-Booleschen Wert erwartet, aber einen String-Wert von "Ja" hat. Wie generieren Sie den JSON? – superfell