Activity Forums Salesforce® Discussions Why do we deserialize our Salesforce JSON response in different Formats?

  • Manpreet

    Member
    January 30, 2018 at 4:08 pm

    Hi Aman,

    This totally depends upon our requirement. If we need 2 or 3 fields from the Response then we don't need to create an additional class. If our response size is large then probably we can make use of an apex class. Thus it all depends upon requirement.

    Thanks.

  • Avnish Yadav

    Member
    September 30, 2018 at 3:13 am

    If you didn't serialize the object into JSON, then the object would not be in a format that the consumer (the system who did the request) would understand. The purpose of serializing it into JSON is so that the message will be a format that can be understood and from there, deserialize it into an object type that makes sense for the consumer.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos