{"action":"created","issue":{"url":"https://api.github.com/repos/ServiceStack/Issues/issues/417","repository_url":"https://api.github.com/repos/ServiceStack/Issues","labels_url":"https://api.github.com/repos/ServiceStack/Issues/issues/417/labels{/name}","comments_url":"https://api.github.com/repos/ServiceStack/Issues/issues/417/comments","events_url":"https://api.github.com/repos/ServiceStack/Issues/issues/417/events","html_url":"https://github.com/ServiceStack/Issues/issues/417","id":146259893,"number":417,"title":"TryToParsePrimitiveTypeValues (presumably) wrongly parses strings to integers.","user":{"login":"dmytro-gokun","id":580460,"avatar_url":"https://avatars.githubusercontent.com/u/580460?v=3","gravatar_id":"","url":"https://api.github.com/users/dmytro-gokun","html_url":"https://github.com/dmytro-gokun","followers_url":"https://api.github.com/users/dmytro-gokun/followers","following_url":"https://api.github.com/users/dmytro-gokun/following{/other_user}","gists_url":"https://api.github.com/users/dmytro-gokun/gists{/gist_id}","starred_url":"https://api.github.com/users/dmytro-gokun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmytro-gokun/subscriptions","organizations_url":"https://api.github.com/users/dmytro-gokun/orgs","repos_url":"https://api.github.com/users/dmytro-gokun/repos","events_url":"https://api.github.com/users/dmytro-gokun/events{/privacy}","received_events_url":"https://api.github.com/users/dmytro-gokun/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-06T10:02:30Z","updated_at":"2016-04-06T18:58:19Z","closed_at":"2016-04-06T13:25:52Z","body":"According to release notes (https://github.com/ServiceStack/ServiceStack.Text/wiki/Release-Notes):\r\n\r\nJsConfig.TryToParsePrimitiveTypeValues - Enables deserialization into object to attempt to figure out the type of the object (ie bool, int, date, etc) rather than always using a string.\r\n\r\nafter the latest fixes this seems to work fine. But, it also does it to much.\r\n\r\nFor example:\r\n\r\n```\r\n        [Test]\r\n        public void Deserialize_NumericStringToObject_ShouldWork()\r\n        {\r\n            const string json = @\"{\"\"Value\"\":\"\"100000\"\"}\";\r\n\r\n            var actual = JsonSerializer.DeserializeFromString<TestType1>(json);\r\n            actual.Value.Should().BeOfType(typeof(string)).And.Be(\"100000\");\r\n        }\r\n```\r\n\r\nhere, the string value \"100000\" gets parsed to an integer value 100000, which in my opinion is not correct. That would be correct if JSON were {\"Value\":100000} where the value is an intger.\r\nThe same happens with \"boolean\" strings, e.g. {\"Value\":\"False\"}.\r\n\r\nAm I correct here? Is it a bug? If it is not, would not make sense to have a glaf to disable this behavior?\r\n"},"comment":{"url":"https://api.github.com/repos/ServiceStack/Issues/issues/comments/206513662","html_url":"https://github.com/ServiceStack/Issues/issues/417#issuecomment-206513662","issue_url":"https://api.github.com/repos/ServiceStack/Issues/issues/417","id":206513662,"user":{"login":"dmytro-gokun","id":580460,"avatar_url":"https://avatars.githubusercontent.com/u/580460?v=3","gravatar_id":"","url":"https://api.github.com/users/dmytro-gokun","html_url":"https://github.com/dmytro-gokun","followers_url":"https://api.github.com/users/dmytro-gokun/followers","following_url":"https://api.github.com/users/dmytro-gokun/following{/other_user}","gists_url":"https://api.github.com/users/dmytro-gokun/gists{/gist_id}","starred_url":"https://api.github.com/users/dmytro-gokun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmytro-gokun/subscriptions","organizations_url":"https://api.github.com/users/dmytro-gokun/orgs","repos_url":"https://api.github.com/users/dmytro-gokun/repos","events_url":"https://api.github.com/users/dmytro-gokun/events{/privacy}","received_events_url":"https://api.github.com/users/dmytro-gokun/received_events","type":"User","site_admin":false},"created_at":"2016-04-06T18:58:19Z","updated_at":"2016-04-06T18:58:19Z","body":"Okay, i get it. I will try to use JsonObject.\r\nIn any case, thanks a lot for your help and time!"}}