【发布时间】:2016-11-10 00:51:45
【问题描述】:
我有一个 json 对象声明,我想在其中使用 DateTime 列表。我该如何申报?我在当前定义中遇到错误。
public class TurtleTrade
{
[JsonProperty("Powerbars")]
public int Powerbars { get; set; }
[JsonProperty("PowerbarsTime")]
public List<DateTime>() PowerbarsTime { get; set; } // Error here
}
【问题讨论】:
-
删除括号。
-
我在当前定义中遇到错误 - 你遇到了什么错误?
-
公开列表
PowerbarsTime { get;放; }
标签: c# .net json list json.net