Content negotiation or serialization is not something that controllers should be concerned about.
Out of the box ASP.NET Web API can return both XML and JSON content, the client may request certain format by setting Accept HTTP header.
Set it to:
Accept: application/json
if you want to get JSON back
Accept: application/xml
if you want to get XML back
EDIT: Also note that Web API by default uses DataContractSerializer, answering questions in your comments:
[DataContract(Namespace = "schemas.datacontract.org/2004/07/Test.Models" )]
public class TheThing
{
[DataMember]
public string Name { get; set; }
[DataMember(Name = "contentname")]
public string ContentName { get; set; }
}