When I'm sending a HTTP Post request from my Apex class and trying to parse the response using JSON Parser, then I'm getting this error. Following is the code that gives me "Method does not exist or incorrect signature: [String].createParser(String)"
req.setMethod('POST');
res = http.send(req);
JSONParser parser = JSON.createParser(res.getBody());
As far as I know createParser is a static method and we can call it like this. I did refer the salesforce.com's document at - http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_json_jsonparser.htm
Could you please help me aout here and correct me where I'm going wrong? Thanks
JSON
of typeString
somewhere preceding this code? – JCD