0

I have a JSON too large to be deserialized, and I'm getting the Exception System.LimitException: Apex heap size too large: 9810745.

I used ProjectClass= (ProjectClass) JSON.deserialize(jsonRequest, ProjectClass.class), where ProjectClass.class is a inner class wrapper.

I write a batch to process the request but before processing the batchfile my json file is too large to handle.please help me to change the code to handle too large file to deserialize.

2

Move your callout and parsing logic to the start method of your batchable class. This method has 12MB of heap available compared to synchronous code's 6MB of available heap.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.