我有一个JSON文件,它有许多JSON对象:
[
"DIEM":
{
"Name":["A"],
"InRul":[]
},
"DOAN":
{
"Name":["A","B"],
"InRul":[]
},
"TAMGIAC":
{
"Name":["A","B","C"],
"InRul":[]
},
"TAMGIACVUONG":
{
"Name":["A","B","C"],
"InRul":[]
}
]
并且,我在C#中有一个课程:
class Content
{
public string Name;
public List<string> InRul;
}
如何将上面的JSON文件转换为C#中的对象?
DIEM.Name //print Array [A]
DOAN.Name //print Array [A,B]
非常感谢!