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
SFDC Dev1 13SFDC Dev1 13 

FATAL_ERROR|System.JSONException: N/A at [line:1, column:7280]

Hi Developers

I'm getting below error.
FATAL_ERROR|System.JSONException: N/A at [line:1, column:7280] 
Class.OTBatchUpdate.execute: line 46, column 1

My requirement is 
I wrote a batch class, i'm having HTTP callout, i will be receiving json response, which i need to parse and update my salesforce objects data. Everything is working fine for one or two records, but when i set batch size to 100, i'm getting above error. 
I believe it 's something related to parsing, and  in the response it has some junk data??
Below is the code where it says issue at
List<ParseJson> responseList = (List<ParseJson>)JSON.deserialize(ssss, List<ParseJson>.class);

Below is the code that i have in execute method.
Http http = new Http();
            HttpRequest request = new HttpRequest();
            request.setEndpoint('ENDPOINT URL');
            request.setMethod('POST');
            request.setHeader('Content-Type', 'application/json;charset=UTF-8');
            request.setHeader('Accept', 'application/json');
            // Set the body as a JSON object
            request.setBody(s);
            request.setTimeout(60000);
            HttpResponse response = http.send(request);
            // Parse the JSON response
            System.debug(response.getBody());
            string jsonresponse = response.getBody();
            String ssss = jsonresponse.unescapeEcmaScript();
            system.debug(ssss);
            ssss = ssss.substring(1, ssss.length()-1);
            system.debug('response after trimming---->>>>'+ssss);

         //   List<Object> results = (List<Object>)JSON.deserializeUntyped(ssss);
         //   system.debug('results'+results);
        
            List<ParseJson> responseList = (List<ParseJson>)JSON.deserialize(ssss, List<ParseJson>.class);
            system.debug('response is '+responseList);

Any pointers for ths issue?

Thanks​
 
Kaustubh LabheKaustubh Labhe
Hey, similar issue here. 

https://salesforce.stackexchange.com/questions/158232/lightning-wrapper-jsonexception/158234

Thanks