function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Raghu Sharma 6Raghu Sharma 6 

processing json output from rest api

I'm calling external Rest API and recieving the output in the form of JSON. What is the best/easiest way to process this output in Apex?

I see that DOM (Document Object Model) approach only works with XML. Is there any standard function to convert JSON to XML?

Also see that there is a direct way of processing JSON as shown in below URL:
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_json_jsonparser.htm

Any sample code to process JSON output will be greatly helpful