Nowadays Providing and Consuming Webservices has become one of the main feature of any application. When you are interested to provide API services through you application you can either choose XML or JSON formats for REST based services.
If you are developing REST services through WebAPI, then it supports some configuration through you can control the response formats. By default WebAPI render as JSON when you invoke the REST Uri. But this is not the case always when you try to access the REST WebAPI Uri from the Browser Address bar. Because, when you manually try to access them WebAPI returns the response in XML format. If you want to see the output as JSON even from the browser then you have landed to the right place.
Here the configuration you need to add them to your WebAPIConfig.cs file in the App_Start folder
What we are doing here is just removing the XML formatter. This will force the JSON formatter to come in place and return the response even though the REST client requests for application/xml.
Note : This is best suited only if you want to support just JSON as response.