I'm making an application in C# for my teacher to use for student attendance and because I'm just starting C# (came from Java), I need someone to guide me in the right direction.
I have Json file containing 2 arrays, one for morning students and one for afternoon students, and I need to parse them both into separate lists. In the Json file, they both have separate names ("morning" and "afternoon"). How can I accomplish this with Json.NET?
I have 2 lists already, morningStudents
and afternoonStudents
each containing students. The Student class contains 3 variables, name, id, and status which corresponds with the fields each student gets in each student array.
Below you can find a representation of what my Json file looks like.
{
"morning":
[
{
"name": "Morning Student 1",
"id": "123456",
"status": "0"
}
],
"afternoon":
[
{
"name": "Afternoon Student 1",
"id": "123456",
"status": "0"
}
]
}