杰森文件=
{
"educations": {
"count": 23,
"education": [{
"studId": "",
"joinDate": "2021-04-08 12:22",
"regDate": "2021-04-08 12:23",
"enrolled": false,
"eduId": "1-eassasa7",
"pId": "dfdgdfg456fghf",
"startDate": "2021-09-03",
"expiry": {
"monthlyExpire": true
},
"reRegistration": "OPTIONAL",
"refreeId1": "",
"refreeId2": "",
"tutor": true,
"libraryAllowed": true,
"sports": "ENABLE",
"sendNotification": true,
"ccEmail": "",
"isTest": false,
"SportsGroup"
以上是我的杰森,我能够将其纳入响应
string rawResponse = apiDataResponse.Content;
var result = JsonConvert.DeserializeObject<RootData>(rawResponse);
下面是我的课
RootData
{
[JsonProperty(PropertyName ="educations")]
public education[] edu1 { get; set; }
}
class educationss
{
public int count { get; set; }
[JsonProperty(PropertyName="education")]
public education[] edu { get; set; }
}
class education
{
public string studId { get; set; }
public DateTime joinDate { get; set; }
public DateTime regDate { get; set; }
public bool enrolled { get; set; }
public string eduId { get; set; }
public string pId { get; set; }
public DateTime startDate { get; set; }
public expiry[] monthlyExpire { get; set; }
public string reRegistration { get; set; }
public string refreeId1 { get; set; }
public string refreeId2 { get; set; }
public bool tutor { get; set; }
public bool LibraryAllowed { get; set; }
public string sports { get; set; }
public bool sendNotification { get; set; }
public string ccEmail { get; set; }
public bool isTest { get; set; }
public sportGroup[] sportGroup { get; set; }
}
但我无法为我的结果变量获得任何值,它显示为空。
Can you please help me?