using System.Collections.Generic;
public static void Main()
var student = new Student { Name = "Joe Schmoe" };
var courses = new List<Course>
new Course { Title = "Underwater Basket Weaving 101" },
new Course { Title = "History of Pancakes 102" }
var anon = new { Student = student, Courses = courses };
var json = JsonConvert.SerializeObject(anon, Formatting.Indented);
Console.WriteLine("\n---------------------------------------\n");
var example = new { Student = new Student(), Courses = new List<Course>() };
var anon2 = JsonConvert.DeserializeAnonymousType(json, example);
Console.WriteLine("Student: " + anon2.Student.Name);
foreach (Course c in anon2.Courses)
Console.WriteLine("Course: " + c.Title);
public string Name { get; set; }
public string Title { get; set; }