You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using DateTimeOffset type and using JToken.Parse, it is converted to DateTime (so it is modified) as it is hardcoded as a standard behavior, see: JamesNK/Newtonsoft.Json#862
(it is closed, but still unresolved for JToken.Parse)
Solution is change JToken.Parse to JToken.Load with StringReader and set option DateParseHandling = DateParseHandling.None; (default is DateTime). It is described here: JamesNK/Newtonsoft.Json#862 (comment)
This issue solved global datetimeoffset destroying data, beacuse there is no option to pass another settings to JToken.Parser to override this default.
Environment
JsonApiDotNetCore Version 3.1
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Description
The problem is on this line
JsonApiDotNetCore/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs
Line 39 in 0416df7
When using DateTimeOffset type and using JToken.Parse, it is converted to DateTime (so it is modified) as it is hardcoded as a standard behavior, see:
JamesNK/Newtonsoft.Json#862
(it is closed, but still unresolved for JToken.Parse)
Solution is change JToken.Parse to JToken.Load with StringReader and set option DateParseHandling = DateParseHandling.None; (default is DateTime). It is described here:
JamesNK/Newtonsoft.Json#862 (comment)
This issue solved global datetimeoffset destroying data, beacuse there is no option to pass another settings to JToken.Parser to override this default.
Environment
The text was updated successfully, but these errors were encountered: