Return <bar>foo</bar> instead of <string>foo</string> in WCF rest method
- by Joannes Vermorel
I have a REST web method in .NET 3.5:
[OperationContract]
[WebInvoke(UriTemplate = "", Method = Verbs.Get)]
public string GetBar()
{
return "foo";
}
The response gets formatted as <string>foo</string> while I would prefer <bar>foo</bar> instead. Does anyone know how to do that? I feel I am missing something obvious.