If I have a string (which is already in JSON format) say
string JsonStr = "{ 'A': 123 }";
My API is
public JsonResult OnGetRetrieve()
{
string JsonStr = "{ 'A': 123 }";
return new JsonResult(JsonStr); // This will return the Json as a string
}
If I wish to return as a Json object, I need to
return new JsonResult(JsonConvert.Deserialize(JsonStr));
I am sure there is a better way than this.
Thanks in advance.