Activity › Forums › Salesforce® Discussions › How to convert object to Json string in apex of Salesforce? › Reply To: How to convert object to Json string in apex of Salesforce?
MemberJuly 24, 2020 at 5:18 pm
<pre title="">Account acc = new Account(Name = 'Account Name', Phone = '8888888888', Industry = 'Agriculture');
//Code to convert Account to JSON string
String str = JSON.serialize(acc);