Here is my apex code"
apex clas
public class GetRestfulExampleSu{
public string jsonStr {get;set;}
public Pagereference getJSONFromREST() {
Http h = new Http();
HttpRequest req = new HttpRequest();
req.setEndpoint('http://dz.co.rplug.renault.com/localsemiclair/BAWn');
req.setHeader('Accept','application/JSON');
req.setMethod('GET');
HttpResponse res = h.send(req);
jsonStr= res.getBody();
system.debug('jsonStr>>>>-->>>>>>'+jsonStr);
jsonStr= res.getBody();
Map<String,Object> rawObj = (Map<String,Object>) JSON.deserializeUntyped(jsonStr);
Map<String,Object> responseObj = (Map<String,Object>)rawObj.get('localSemiClair');
Map<String,Object> responseObjinside2 = (Map<String,Object>)responseObj.get('mapRepresentation');
Map<String,Object> responseObjinside3 = (Map<String,Object>)responseObjinside2 .get('map');
List<Object> reqs = (List<Object>) responseObjinside3 .get('map');
List<string> lsstr= new List<string> ();
for(Object a:reqs){
lsstr=(List<string>)a;
}
return null;
}
}
I want to convert "reqs" value into a list of string. It showing error.Please help me out.Thanks in advance!!