I have a json
var j = @"
[{"Name":"John","Age":27},
{"Name":"Mike","Age":30},
{"Name":"Eric","Age":21}
]";
And class:
public class Worker
{
public string Name{set;get;}
public int Age{set;get;}
}
And how i can deserialize it with Newtonsoft.Json:
List<Worker> videogames = JsonConvert.DeserializeObject<List<Worker>>(j);
But what if i don't know what class I want to deserialize and have just a type?
var worker = new Worker();
Type myType = worker.GetType();
How can i deserialize this json string in this case?