Return “raw” json in ASP.NET Core 2.0 Web Api

And of course a few minutes after posting the question I stumble upon a solution 🙂

Just return Content with the content type application/json

return Content("{ \"name\":\"John\", \"age\":31, \"city\":\"New York\" }", "application/json");

Leave a Comment