Return "raw" json in ASP.NET Core 2.0 Web Api : <p>The standard way AFAIK to return data in ASP.NET Core Web Api is by using <code>IActionResult</code> and providing e.g. an <code>OkObject</code> result. This works fine with objects, but what if I have obtained a JSON string somehow, and I just want to return that JSON back to the caller?</p>

<p>e.g. </p>

<pre><code>public IActionResult GetSomeJSON()
{
    return Ok("{ \"name\":\"John\", \"age\":31, \"city\":\"New York\" }");
}
</code></pre>

<p>What ASP.NET Core does here is, it takes the JSON String, and wraps it into JSON again (e.g. it escapes the JSON)</p>

<p>Returning plain text with <code>[Produces("text/plain")]</code> does work by providing the "RAW" content, but it also sets the content-type of the response to PLAIN instead of JSON. We use <code>[Produces("application/json")]</code> on our Controllers.</p>

<p>How can I return the JSON that I have as a normal JSON content-type without it being escaped?</p>

<p><em>Note: It doesn't matter how the JSON string was aquired, it could be from a 3rd party service, or there are some special serialization needs so that we want to do custom serialization instead of using the default JSON.NET serializer.</em></p>
