score:3

Accepted answer

All you need to do is the following:

public ActionResult JsonString()
{
    var p = new Parser("ALL");
    return Content(p.BuildJson(), "application/json");
}

Providing p.BuildJson() returns the json string, without specifying content type it defaults to text/plain.


Related Query