the code below does not return any errors but still does not convert the JSON to object
JSON string I got from an API
{
"genres": [
{
"id": 28,
"name": "Action"
},
{
"id": 12,
"name": "Adventure"
}
]
}
General Test Class
public class Test
{
public int id;
public string Name;
}
the code below shows how I tried to convert the JSON string to List of Test class
string JsontStr = GenreService.get();
var Serializer = new JavaScriptSerializer();
List<Test> a = (List<Test>)Serializer.Deserialize(JsontStr, typeof(List<Test>));
an image of what the object a has in it when the program has finished running