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
AbAb 

setting json string in json body manually

Hello,

I have a JSON string,
I want to set it manually in eq.setBody(jsonBody);
but because the JSON file is too long, it doenst accept it

it show issues with doubele quotes, sigle quotes, etc

how can this be possible ?
 
Best Answer chosen by Ab
Abhishek BansalAbhishek Bansal
Hi Sandrine,

You can use the below online tool to validate the json string:
https://jsonformatter.curiousconcept.com/

Please validate and issues and than try to use in your code.

Thanks,
Abhishek Bansal.

All Answers

Abhishek BansalAbhishek Bansal
Hi Sandrine,

You can use the below online tool to validate the json string:
https://jsonformatter.curiousconcept.com/

Please validate and issues and than try to use in your code.

Thanks,
Abhishek Bansal.
This was selected as the best answer
AbhishekAbhishek (Salesforce Developers) 
This blog has a code snippet for your requirement

https://salesforce.stackexchange.com/questions/179840/add-json-string-in-json-body

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

Thanks.