How to create RESTful Web services in 10 minutes with Visual Studio 2012 AiM website | ... - 0 views
-
By default the API return XML, but we’ll use JSON here, as it’s also becoming a standard. To do so we must add the following code in the register() method located in the file WebApiConfig.cs config.Formatters.XmlFormatter.SupportedMediaTypes.Remove( config.Formatters.XmlFormatter.SupportedMediaTypes.FirstOrDefault(t => t.MediaType == 'application/xml'));