【发布时间】:2016-10-03 09:58:03
【问题描述】:
我想知道如何解析 JSON 对象中的日期,该对象可以在我的 WebApi 控制器中转换为 DateTime。
myObject: {
"key":"value",
...
"DateOfBirth": "" // <-- What should I parse my date as here?
}
仅供参考,我正在使用 Postman 测试我的 RESTful 端点。
【问题讨论】:
-
来自 Newtonsoft 文档:
The default format used by Json.NET is the ISO 8601 standard: "2012-03-19T07:22Z". -
谢谢亚当,我会试试这个。
标签: c# json datetime json.net postman