Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# RestSharp不反序列化所有值_C#_Deserialization_Restsharp - Fatal编程技术网

C# RestSharp不反序列化所有值

C# RestSharp不反序列化所有值,c#,deserialization,restsharp,C#,Deserialization,Restsharp,我从RestSharp得到了不准确的反序列化结果 字段TodaysCases和TodaySDaths始终反序列化为“0” 问题是什么 var client = new RestClient("https://corona.lmao.ninja/countries"); var response = client.Execute<List<CountryItem>>(new RestRequest()); Json 你有打字错误 [JsonProperty(Propert

我从RestSharp得到了不准确的反序列化结果 字段TodaysCases和TodaySDaths始终反序列化为“0” 问题是什么

var client = new RestClient("https://corona.lmao.ninja/countries");
var response = client.Execute<List<CountryItem>>(new RestRequest());
Json

你有打字错误

[JsonProperty(PropertyName = "todaysCases"]
应该是

[JsonProperty(PropertyName = "todayCases"]
今天的节日也一样

[JsonProperty(PropertyName = "todaysCases"]
[JsonProperty(PropertyName = "todayCases"]