I have developed WebAPI for mobile which should return JSON and it is working fine returning JSON but JSON comes under XML.
Below is my code and screenshot.
return JsonConvert.SerializeObject(result);
"result" is my response class in which I am filling data. I tried with JavaScriptSerializer and JsonConvert of Newsoft but failed.
How can I get it work with simple string in JSON?