• #20858
    Salesforce | Aman Aman #4

    Why do we deserialize our Salesforce JSON response in different Formats?

    Sometimes we deserialize our response in Apex class, sometimes in Map and sometimes in simple sObjects.


    Salesforce | Manpreet Manpreet #232

    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.



    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.

Viewing 3 posts - 1 through 3 (of 3 total)

Please to reply to this topic.


We're not around right now. But you can send us an email and we'll get back to you, asap.


About Us

Forcetalks is a Salesforce collaboration platform for coders & developers, geeks & nerds, consultants & business heads, admins & architects, managers & marketers and of course the business owners. A community where you can learn from, where you can contribute to. For you. For Salesforce. Read More...

Copyright 2019 Forcetalks. All Right Reserved.

Log in with your credentials


Forgot your details?