function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
GT1945GT1945 

Cannot deserialize instance of double from VALUE_STRING value


Response Status Code: 400 BadRequest Response Body
: [ { "message": "Cannot deserialize instance of double from VALUE_STRING value or request may be missing a required field at [line:2, column:3]", "errorCode": "JSON_PARSER_ERROR" } ]

Request Body: { "Guest_Bedrooms__c": "
", "FirstName": "", "LastName": "
", "Email": "test@fb.com",
"Phone": " ",
"PostalCode": "

I cannot ingest leads and getting the above error. Any idea how I fix this?
 
Deepali KulshresthaDeepali Kulshrestha
Hi GT1945,

Greetings to you!

Two problems here:

(a) Decimal receiving String value.

The value should not be in quotes.

(b) You must not have a trailing comma.

JSON-compliant strings are more strict than normal JavaScript (Example).

[{
  "name":"OpportunityABC",
  "CloseDate":"2017-06-03",
  "StageName":"Pre-Engagement",
  "Amount":4810308.0
}]

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,
Deepali Kulshrestha