18
so the followwing works just fine, giving me a Team object from the string json:
var found = JsonConvert.DeserializeObject<Team>(json);
but what if I won't know the type until runtime? Say I've got the string json as above, but I also have another string with the type name? for example, this isn't working:
var found = JsonConvert.DeserializeObject(json, Type.GetType("Team"));
Unable to cast object of type 'Newtonsoft.Json.Linq.JArray' to type ...