I have a JSON file like below, the first field has more than 500 values, how can I deserialize to C# class at bottom?
[
{
"E1001": { "MESSAGE": "", "CODE": 1001 }
},
{
"E1002": { "MESSAGE": "", "CODE": 1002 }
}
]
public class RootModel
{
public string ErrorCode { get; set; }
public ErrorDetail Details { get; set; }
}
public class ErrorDetailModel
{
public string Message { get; set; }
public string Code { get; set; }
}