I cannot figure out why my model will not get populated with the data from my JSON string. Here is the model:
public class MidasReturnModel
{
public string status { get; set; }
public string msg { get; set; }
}
And here is my C# code:
MidasReturnModel rtn = JsonConvert.DeserializeObject<MidasReturnModel>(post_responseTemp);
And here is the JSON string post_responseTemp as it gets passed in to that function:
"{\"MidasReturnModel\": {\"status\":\"warn\", \"msg\":\"Customer does not have contract for this season\"}}"
Can anyone see what I am doing wrong? "rtn" is a Model with both status and msg being "null" when I run through the code.