Dynamic JSON String Format in Apex

The reason I’m creating this post is because I spend a lot of time on this by just putting some double Quotes, single Quotes blah blah.  I just want to save you time by showing you a demo of the JSON String i.e dynamic.

Most of the time you need a dynamic JSON while writing a test class where the input is a JSON string and to test your use case you need to enter your record data into the string so I’m really in a mess while creating a Dynamic JSON for my Test Class.

Learn more about Salesforce Flow Bootcamp

So check this out.

Register for Salesforce Flow Bootcamp

Here is the Dynamic JSON Highlighted Code:

 

Thank you

Share Now

Shubham is the Founder of Salesforce Geek. He is also a Salesforce Certified Consultant.

Similar Posts

One thought on “Dynamic JSON String Format in Apex

  1. Hi my name is aman . your youtube videoes are really helpfull please make a playlist on VF Pages along with JS Remotting.

Leave a Reply

Your email address will not be published. Required fields are marked *