asp.net core controller – Return string as valid json
[HttpPost] [Route("[action]")] public string GetString() { return "abc"; } When I use the method above in an asp.net core controller the result is not formatted as json and the content type is text/plain. While every non-primitive result type is indeed…