You need to sign in to do that
Don't have an account?

Please help me with JSON
Whenever I am trying to hit the platform event bus in the format below then it gets successful but it's not being parsed as this has single quotes inside Message_Details__c.
But when I am sending the correct JSON as below then it gives me error :
{ "Message_Name__c": "Batch Failure", "Source__c": "IPE", "Destination__c": "Salesforce", "Message_Action__c": "Testing", "Message_Details1__c":"{[{'ValidationErrorDetails': 'Duplicate Invoice Batch'},{'ValidationErrorDetails1': 'Duplicate Invoice Batch1'}]}" } Response : { "id": "e06xx0000000001AAA", "success": true, "errors": [ { "statusCode": "OPERATION_ENQUEUED", "message": "1b05b592-cbec-42c1-aa3d-737d3980590c", "fields": [] } ]
But when I am sending the correct JSON as below then it gives me error :
{ "Destination__c": "Salesforce", "Source__c": "IPE", "Message_Action__c": "Success", "Message_Name__c":"Invoice", "Message_Details1__c": [{ "InvoiceNumber": "DRAFT-0000001", "AWSURL": "the AWS S3 bucket url for the PDF generated"}] } Response : [ { "message": "Cannot deserialize instance of textarea from START_ARRAY value [line:9, column:44]", "errorCode": "JSON_PARSER_ERROR" } ]