Activity Forums Salesforce® Discussions How JSON is converted into Apex class in Salesforce?

  • Shweta

    November 12, 2020 at 2:57 pm

    You can create a wrapper with a list of objects like below and deserialize JSON to the wrapper.
    Public class JSONtoApexClasses{
    Public List<JSONtoApexClass> tickets {get; set;}
    public class JSONtoApexClass{
    public String SUMMARY;
    public String CUSTOMERUSEREMAIL;
    public static JSONtoApexClasses parse(String json) {
    return (JSONtoApexClasses) System.JSON.deserialize(json, JSONtoApexClasses.class);

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos