如何使用类装饰在嵌套对象中选择json值"estimatedLocationDate"?属性"estimatedLocationDate"始终返回null而不是值2015-10-01T14:00:00.000.其他修饰值返回正确的值.
这是我的C#课
public string id { get; set; }
public string name { get; set; }
[JsonProperty("publishedDate")]
public string publishdate { get; set; }
[JsonProperty("estimatedLocationDate")]
public string estimatedLocationDate{ get; set; }
[JsonProperty("createdTime")]
public string createtime { get; set; }
[JsonProperty("lastUpdatedTime")]
public string lastupdate { get; set; }
Run Code Online (Sandbox Code Playgroud)
而这就是 JSON
"planet": [
{
"id": "123456",
"planetid": "en-us/Jupiter-mars/---main",
"name": "The planet Mercury",
"description": "This is placeholder for the description",
"publishedDate": "2013-10-14T23:30:00.000",
"createtime": "2012-03-01T14:00:00.000",
"product": …Run Code Online (Sandbox Code Playgroud)