I have a function in ApiController, which is supposed to output an object of some kind. That function receives that object in already serialized format. In order for the function to end up returing valid JSON, I need to turn it into JObject, like this:
[HttpGet]
public object MyFunction()
{
string result = .......;
return JObject.Parse(result);
}
Question is: the result is already a valid JSON, and I want to return it as-is, without any more processing. If my class was a regular Controller, I could have just returned a ContentResult, but for some reasons, I cannot turn ApiController into regular Controller in this case.
Any other options?