var obj = new {Id = 15, Name = "adam"};
var str = Newtonsoft.Json.JsonConvert.SerializeObject(obj);
Person p = Newtonsoft.Json.JsonConvert.DeserializeObject<Person>(str);
System.Console.WriteLine($"{p.Id}, {p.Name}");
class Person
{
public int Id { get; set; }
public string Name { get; set; }
}