I created a ASP.NET MVC 4 Web application. Within this application i implemented several rest webservices and here comes my question: Is it possible to force the object serialization to use the enum entity names instead of their values?
This is my enum:
public enum ReturnCode { OK, InvalidParameter }
This is what I get:
{
"returnCode": 0,
"data": null
}
But this is what I want:
{
"returnCode": OK,
"data": null
}
Is there a way to achieve this?