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.

1 Answer 1

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .