I want to deserialize an object at runtime and cannot figure out how to pass in the type without actually passing in model type.
E.g.
JsonConvert.DeserialzeObject(objectToDeserialize);
I want to be able to do something like this:
Type runtimeType = Type.GetType("namespace_and_class_name");
var result = JsonConvert.DeserializeObject<runtimeType>(objectToDeserialize);
or something like:
var result = JsonConvert.DeserializeObject<Type.GetType(stringOfType)>(objectToDeserialize);