{"action":"created","issue":{"url":"https://api.github.com/repos/JamesNK/Newtonsoft.Json/issues/862","repository_url":"https://api.github.com/repos/JamesNK/Newtonsoft.Json","labels_url":"https://api.github.com/repos/JamesNK/Newtonsoft.Json/issues/862/labels{/name}","comments_url":"https://api.github.com/repos/JamesNK/Newtonsoft.Json/issues/862/comments","events_url":"https://api.github.com/repos/JamesNK/Newtonsoft.Json/issues/862/events","html_url":"https://github.com/JamesNK/Newtonsoft.Json/issues/862","id":144578925,"node_id":"MDU6SXNzdWUxNDQ1Nzg5MjU=","number":862,"title":"Json.NET interprets and modifies ISO dates when deserializing to JObject","user":{"login":"FrancoisBeaune","id":16878244,"node_id":"MDQ6VXNlcjE2ODc4MjQ0","avatar_url":"https://avatars3.githubusercontent.com/u/16878244?v=4","gravatar_id":"","url":"https://api.github.com/users/FrancoisBeaune","html_url":"https://github.com/FrancoisBeaune","followers_url":"https://api.github.com/users/FrancoisBeaune/followers","following_url":"https://api.github.com/users/FrancoisBeaune/following{/other_user}","gists_url":"https://api.github.com/users/FrancoisBeaune/gists{/gist_id}","starred_url":"https://api.github.com/users/FrancoisBeaune/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FrancoisBeaune/subscriptions","organizations_url":"https://api.github.com/users/FrancoisBeaune/orgs","repos_url":"https://api.github.com/users/FrancoisBeaune/repos","events_url":"https://api.github.com/users/FrancoisBeaune/events{/privacy}","received_events_url":"https://api.github.com/users/FrancoisBeaune/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":68,"created_at":"2016-03-30T12:50:02Z","updated_at":"2018-08-07T11:27:27Z","closed_at":"2016-05-31T23:25:04Z","author_association":"NONE","body":"We're using Json.NET 8.0.2 in a C# 4.5 project, and we love it.\n\nHowever this behavior bit us pretty hard:\n\n``` c#\nvar obj = JsonConvert.DeserializeObject<JObject>(\"{ 'x': '2016-03-31T07:02:00+07:00' }\");\n```\n\nHere, in our time zone, `ob[\"x\"].Value<string>()` returns `\"2016-03-31T02:02:00+02:00\"`.\n\nThe problem disappears if we specify how to parse dates:\n\n``` c#\nvar obj = JsonConvert.DeserializeObject<JObject>(\"{ 'x': '2016-03-31T07:02:00+07:00' }\",\n    new JsonSerializerSettings() { DateParseHandling = DateParseHandling.None });\n```\n\nBut I find it _dangerously surprising_ that by default Json.NET interprets strings as dates (let alone the performance issues this inevitably brings with it).\n\nIs this the expected behavior? If so, is there a way to disable this behavior globally?\n"},"comment":{"url":"https://api.github.com/repos/JamesNK/Newtonsoft.Json/issues/comments/411024391","html_url":"https://github.com/JamesNK/Newtonsoft.Json/issues/862#issuecomment-411024391","issue_url":"https://api.github.com/repos/JamesNK/Newtonsoft.Json/issues/862","id":411024391,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMTAyNDM5MQ==","user":{"login":"ckpearson","id":5690115,"node_id":"MDQ6VXNlcjU2OTAxMTU=","avatar_url":"https://avatars0.githubusercontent.com/u/5690115?v=4","gravatar_id":"","url":"https://api.github.com/users/ckpearson","html_url":"https://github.com/ckpearson","followers_url":"https://api.github.com/users/ckpearson/followers","following_url":"https://api.github.com/users/ckpearson/following{/other_user}","gists_url":"https://api.github.com/users/ckpearson/gists{/gist_id}","starred_url":"https://api.github.com/users/ckpearson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ckpearson/subscriptions","organizations_url":"https://api.github.com/users/ckpearson/orgs","repos_url":"https://api.github.com/users/ckpearson/repos","events_url":"https://api.github.com/users/ckpearson/events{/privacy}","received_events_url":"https://api.github.com/users/ckpearson/received_events","type":"User","site_admin":false},"created_at":"2018-08-07T11:27:27Z","updated_at":"2018-08-07T11:27:27Z","author_association":"NONE","body":"Just as an additional hat in the ring, this has just bitten us and taken a day or two to find what was going on.\r\n\r\nThe behaviour of a string being interpreted without being asked is pretty counterintuitive, and any \"spooky action at a distance\" in programming really should be avoided...\r\n\r\nThat said, a few settings changes to tweak this and ensure outbound dates get serialised the way we need them to isn't too onerous."}}
{"actor":{"display_login":"ckpearson"}}