I'm using web api. I've been a bit lazy and decided to return a value tuple from my controller.
[HttpGet]
[Route(AuthAPIRoutes.GET_MFA_DEVICES)]
public (string Type, string Value)[] GetMultiFactoryMethods()
{
return GlobalFactory<IPaystreamMFASecurityService>.Instance.GetMultiFactorMethods();
}
The JSON response doesn't seem to be using the appropriate naming is this being optimized away?
{
"item1": "Phone",
"item2": "1-512-555-0550"
}
NOTE: I'm aware I can explicitly make a model to avoid this problem. I would like to understand what is occurring and why aren't my value tuple names being respected in the response?