Pass (Send) JSON data to Web API in ASP.Net MVC

Last Reply 8 months ago By SUJAYS

Posted 8 months ago

As I have created WebAPI in MVC.

Is it possible to pass data as json ?

Posted 8 months ago

Posted 8 months ago

Adding this code in Global.asax

GlobalConfiguration.Configuration.Formatters.XmlFormatter.SupportedMediaTypes.Clear();

As I have got result in XML, this line of coding convert XML data to JSON format