You need to sign in to do that
Don't have an account?
Priyesh Misquith 12
Gettinng Null value agfter deserialize the json - integration
I am getting null as value after desearlise of the callout response
List<Map<String, Object>> myMaps = new List<Map<String, Object>>(); Http http = new Http(); HttpRequest request = new HttpRequest(); request.setEndpoint('https://priyesh01.github.io/SampleJson/JsonDummy.json'); request.setMethod('GET'); HttpResponse response = http.send(request); System.debug('$$Response'+response.getBody()); // If the request is successful, parse the JSON response. if (response.getStatusCode() == 200) { System.debug('I am able to hit end point'); Map<String, Object> results = (Map<String, Object>) JSON.deserializeUntyped(response.getBody()); myMaps = new List<Map<String, Object>>(); List<Object> draftAlarmsRequest = (List<Object>) results.get('draftAlarmsRequest'); system.debug('$$ draftAlarmsRequest '+draftAlarmsRequest); }I am geeting null in the draftAlarmsRequest.
In any response, first check the type and structure of data you are getting.
You can refer below working code to get insights: