using System.Collections.Generic;
public String name { get; set; }
public String id { get; set; }
public Int32 status { get; set; }
public override String ToString() {
return name + "(" + id + "): " + status.ToString();
public class StudentSchedule {
public IList<Student> morning { get; set; }
public IList<Student> afternoon { get; set; }
public static void Main()
'name': 'Morning Student 1',
'name': 'Afternoon Student 1',
StudentSchedule studentSchedule = JsonConvert.DeserializeObject<StudentSchedule>(myJson);
Console.WriteLine("========== MORNING ===========");
foreach(Student student in studentSchedule.morning) {
Console.WriteLine(student);
Console.WriteLine("========== AFTERNOON ===========");
foreach(Student student in studentSchedule.afternoon) {
Console.WriteLine(student);