{"action":"opened","issue":{"url":"https://api.github.com/repos/SwiftyJSON/SwiftyJSON/issues/735","repository_url":"https://api.github.com/repos/SwiftyJSON/SwiftyJSON","labels_url":"https://api.github.com/repos/SwiftyJSON/SwiftyJSON/issues/735/labels{/name}","comments_url":"https://api.github.com/repos/SwiftyJSON/SwiftyJSON/issues/735/comments","events_url":"https://api.github.com/repos/SwiftyJSON/SwiftyJSON/issues/735/events","html_url":"https://github.com/SwiftyJSON/SwiftyJSON/issues/735","id":191314191,"number":735,"title":"[discussion] change behaviour of `.int` and `.intValue`","user":{"login":"Evertt","id":1267282,"avatar_url":"https://avatars.githubusercontent.com/u/1267282?v=3","gravatar_id":"","url":"https://api.github.com/users/Evertt","html_url":"https://github.com/Evertt","followers_url":"https://api.github.com/users/Evertt/followers","following_url":"https://api.github.com/users/Evertt/following{/other_user}","gists_url":"https://api.github.com/users/Evertt/gists{/gist_id}","starred_url":"https://api.github.com/users/Evertt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Evertt/subscriptions","organizations_url":"https://api.github.com/users/Evertt/orgs","repos_url":"https://api.github.com/users/Evertt/repos","events_url":"https://api.github.com/users/Evertt/events{/privacy}","received_events_url":"https://api.github.com/users/Evertt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-23T16:05:43Z","updated_at":"2016-11-23T16:05:43Z","closed_at":null,"body":"As I understand it, SwiftyJSON wants to allow for fuzzy types, because that's how javascript works too, right? I like that, but I don't like how that's implemented.\r\n\r\nRight now, `.int` returns an optional int, which is nil if the value is not a real int. And `.intValue` provides an int no matter what, which means is tries to convert other values to int values and if that's not possible then it returns a 0.\r\n\r\nThe thing I don't like about `.intValue` is that if I get a `0` back, that I don't know if the value wasn't a valid integer, or if the value was in fact a 0. I would like to have a feature that's a bit in between these two features. I would like something that tries to convert the value to an int, and if that's not possible, to return a nil.\r\n\r\nDoes anyone else like this idea?"}}
{"actor":{"display_login":"Evertt"}}