- July 12, 2018 at 12:56 pm #29850shradha jain #16
JSON in Salesforce.
Which parsing method is better – Deserialisation or JSON Parser ?And Why?July 12, 2018 at 1:07 pm #29852madhulika shah #14
JSON is the most preferred way of transferring data over web. We use this most in salesforce when integrating with an external system. In most of the integrations, you typically use HTTP Callouts to the end points defined by various services, and the most common response format returned by these is JSON. Parsing this JSON would be very time consuming . One way of doing this would be manually parsing the complete JSON using the JSONParser method but Deserialization parsing method is better because
<Class/Object> n = (<Class/Object>)JSON.deserialize(‘JSON’, <Class/Object>.class);
This one statement would completely deserialize the JSON and store the values in the respective member variables of the class.July 12, 2018 at 1:17 pm #29862
Please Register to reply to this topic. /