+ Start a Discussion
Sridhar Bojja 5Sridhar Bojja 5 

Getting heap size error while deserializing json response in apex

Getting heap size error while deserializing json response in apex

(List<ContractServiceResponseWrapper.Item>)System.JSON.deserialize(JSON.serialize(myMaps), List<ContractServiceResponseWrapper.Item>.class)

 
DevADSDevADS
Hi Sridhar,

Check if you can use future methods with higher limites, please see below for the code reference -
@future(limits='2xHeap')
public static void myFutureMethod() {
    // Your code here
}
OR
Check if the external system can send response in multiple pages.

Do post here if you have any following questions w.r.t the same thread.