I am Deserializing Json with below code.
public class MyArray
{
public int RequestID { get; set; }
public int Status { get; set; }
public string ResponseMessage { get; set; }
}
public class Root
{
public List<MyArray> MyArray { get; set; }
}
var rawJson = "[{\"RequestID\":12345,\"Status\":100,\"ResponseMessage\": \"API Call Successful\"}]";
var myDeserializedClass1 = JsonConvert.DeserializeObject<Root>(rawJson);
I am getting below error. It is not populating the the My Array. Any thoughts on what's going wrong here.
Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'xyz.Root' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly.
