I\'ve written two ASP.NET Web API applications this week which both contain a single simple controller; I\'ve tweaked each to get them to work, include exceptions, and so on
To restrict output to only one formatter, try the instructions here:
http://www.asp.net/web-api/overview/formats-and-model-binding/json-and-xml-serialization#removing_the_json_or_xml_formatter
On a related note, the following link covers how ASP.NET Web API decides what output format to use depending on the HTTP request sent to it, i.e. how it chooses JSON over XML:
http://www.asp.net/web-api/overview/formats-and-model-binding/content-negotiation
It may be useful if you want to still support both formats, but need to ensure your own client code always receives JSON back.