I can only write this in pseudo-code since I don't know the correct syntax.. If there is one.
I have a method I want to call:
JsonConvert.DeserializeObject<Type>(string value);
Which would return the given type.
The problem is that I don't know how to pass the type to that method since I won't know the type at build time. The method from my MVC Controller would be:
public JsonResult Save(string typeName, string model)
{
// Insert your genius answer here.
}
I need to have my type later on so I can use a DataContractSerializer to store it.
Any help would be appreciated.