I have this code in C# mvc Controller:
[HttpPost]
public ActionResult Delete(string runId)
{
if (runId == \"\" || runId == null)
You can use like this - the result will be the expected object definition. So in case of success, your success flag will be TRUE otherwise false and if false then you should expect that the error property will be updated with the error message.
JsonResult jsonResult = oemController.List() as JsonResult;
JavaScriptSerializer serializer = new JavaScriptSerializer();
Result result = serializer.Deserialize(serializer.Serialize(jsonResult.Data));
public class Result
{
public bool success ;
public string error;
}