I need to convert a string to an object, just like how model binding happens in MVC controllers.
so if I have a string of json like this:
{
"name": "tom",
"job": "developer",
"projects": ["projectOne", "projectTwo"]
}
I could the convert it to this object:
public class Developer
{
public string name {get; set;}
public string job {get; set;}
public string[] projects {get; set;}
}
something like this:
Developer developer = Convertor.TryConvert<Developer>(myJson);
so is there any library or function that can do this?