Make names of named tuples appear in serialized JSON responses
For serializing response just use any custom attribute on action and custom contract resolver (this is only solution, unfortunately, but I’m still looking for any more elegance one). Attribute: public class ReturnValueTupleAttribute : ActionFilterAttribute { public override void OnActionExecuted(HttpActionExecutedContext actionExecutedContext) { var content = actionExecutedContext?.Response?.Content as ObjectContent; if (!(content?.Formatter is JsonMediaTypeFormatter)) { return; } var … Read more