Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我使用 Newtonsoft.Json.NET,它默认为 iso8601(即:)2011-06-02T09:34:29+02:00用于序列化/反序列化日期。
2011-06-02T09:34:29+02:00
为什么 ServiceStack.Text 不默认为此而我需要将其指定为配置设置?
ServiceStack 遵循 .NET DataContractSerializer 默认值,而不是 JSON.NET。我们不愿意进行这样的重大更改,尤其是当有一种简单的方法可以通过以下方式配置它时:
JsConfig.DateHandler = DateHandler.ISO8601;