I am currently working on a client-server system in C# and ASP.NET, which, among other things, passes DateTime objects back and forth as pasrt of a DataCOntract.
The API endpoint written using a ASP.NET Web API project accepts and returns JSON from the Windows client app. For some reason, the DataContractJSONSerializer in the client app doesn't accept the JSON-encapsulated DateTime object being pulled from the server.
Server output:
[
{"title":"My Object", "time":"2017-02-20T12:37:35.53" },
{"title":"My Second Object", "time":"2017-02-20T12:37:35.53" }
]
But the DataContractJsonSerializer expects the DateTime to be in a format like this:
\/Date(12345789)\/
How can I change one or the other?