At the moment of consuming an api, the next response returns.
[
{
"MiKey": 0000,
"MiKey": 02,
"MiKey": "CADENA",
}
]
Fictitious data
My Model:
public class RootObject
{
public int MiKey { get; set; }
public int MiKey { get; set; }
public string MiKey { get; set; }
}
Fictitious data
But at the time of doing the await with this model, it returns the following error.
Can not deserialize the current JSON array (eg [1,2,3]) into type 'DetamaticWeb.Models.RootOb' because the type requires a JSON object (eg {"name": "value"}) to deserialize correctly . To fix this error either change the JSON to a JSON object (eg {"name": "value"}) or change the deserialized type to an array or a type that implements a collection interface (eg ICollection, IList) like List that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array. Path '', line 1, position 1.
What would be the model to generate correctly? Since from what I see the model or the data output is the one giving the problem.