You need to sign in to do that
Don't have an account?
Sridhar 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)
(List<ContractServiceResponseWrapper.Item>)System.JSON.deserialize(JSON.serialize(myMaps), List<ContractServiceResponseWrapper.Item>.class)
Check if you can use future methods with higher limites, please see below for the code reference - 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.
Hi, Sridhar
Recently i faced this issue . i got it resolved by writtng a batch class to it.
In Futre class - i am making a callout and formatting the json into Correct Format removing any '//' all those things.
written a queuable class and in there i changed the Json string into a List and called the batch class -parameters are list<object> jsonstirng. with scope limit 2000.
in the batch class i had the deserailze it as it taken into chunks and it is worked Fine.
No heap size error got a log file size of 6.7 mb from 19.1 mb(without using batch).
Do ask if u have any Questions regarding this.