Looking at your json, you are defining the MidasReturnModel
in it.
When this is getting deserialized, it is looking for a property called MidasReturnModel
on your class.
I would try your json as:
{
"status": "warn",
"msg": "Customer does not have contract for this season"
}
If you are wanting to keep your json the same, then it would have to be a case of wrapping your viewmodel in another class.
public class MidasWrapper
{
public MidasReturnModel MidasReturnModel { get; set; }
}
public class MidasReturnModel
{
public string status { get; set; }
public string msg { get; set; }
}
var rtn = JsonConvert.DeserializeObject<MidasWrapper>(post_responseTemp);