{"action":"created","issue":{"url":"https://api.github.com/repos/EasyMapping/EasyMapping/issues/83","labels_url":"https://api.github.com/repos/EasyMapping/EasyMapping/issues/83/labels{/name}","comments_url":"https://api.github.com/repos/EasyMapping/EasyMapping/issues/83/comments","events_url":"https://api.github.com/repos/EasyMapping/EasyMapping/issues/83/events","html_url":"https://github.com/EasyMapping/EasyMapping/pull/83","id":56119159,"number":83,"title":"Helper methods for common mapping cases","user":{"login":"ilyapuchka","id":1488293,"avatar_url":"https://avatars.githubusercontent.com/u/1488293?v=3","gravatar_id":"","url":"https://api.github.com/users/ilyapuchka","html_url":"https://github.com/ilyapuchka","followers_url":"https://api.github.com/users/ilyapuchka/followers","following_url":"https://api.github.com/users/ilyapuchka/following{/other_user}","gists_url":"https://api.github.com/users/ilyapuchka/gists{/gist_id}","starred_url":"https://api.github.com/users/ilyapuchka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilyapuchka/subscriptions","organizations_url":"https://api.github.com/users/ilyapuchka/orgs","repos_url":"https://api.github.com/users/ilyapuchka/repos","events_url":"https://api.github.com/users/ilyapuchka/events{/privacy}","received_events_url":"https://api.github.com/users/ilyapuchka/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"DenHeadless","id":853604,"avatar_url":"https://avatars.githubusercontent.com/u/853604?v=3","gravatar_id":"","url":"https://api.github.com/users/DenHeadless","html_url":"https://github.com/DenHeadless","followers_url":"https://api.github.com/users/DenHeadless/followers","following_url":"https://api.github.com/users/DenHeadless/following{/other_user}","gists_url":"https://api.github.com/users/DenHeadless/gists{/gist_id}","starred_url":"https://api.github.com/users/DenHeadless/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DenHeadless/subscriptions","organizations_url":"https://api.github.com/users/DenHeadless/orgs","repos_url":"https://api.github.com/users/DenHeadless/repos","events_url":"https://api.github.com/users/DenHeadless/events{/privacy}","received_events_url":"https://api.github.com/users/DenHeadless/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-01-31T09:24:11Z","updated_at":"2015-02-01T19:34:59Z","closed_at":"2015-02-01T19:34:59Z","pull_request":{"url":"https://api.github.com/repos/EasyMapping/EasyMapping/pulls/83","html_url":"https://github.com/EasyMapping/EasyMapping/pull/83","diff_url":"https://github.com/EasyMapping/EasyMapping/pull/83.diff","patch_url":"https://github.com/EasyMapping/EasyMapping/pull/83.patch"},"body":""},"comment":{"url":"https://api.github.com/repos/EasyMapping/EasyMapping/issues/comments/72379970","html_url":"https://github.com/EasyMapping/EasyMapping/pull/83#issuecomment-72379970","issue_url":"https://api.github.com/repos/EasyMapping/EasyMapping/issues/83","id":72379970,"user":{"login":"DenHeadless","id":853604,"avatar_url":"https://avatars.githubusercontent.com/u/853604?v=3","gravatar_id":"","url":"https://api.github.com/users/DenHeadless","html_url":"https://github.com/DenHeadless","followers_url":"https://api.github.com/users/DenHeadless/followers","following_url":"https://api.github.com/users/DenHeadless/following{/other_user}","gists_url":"https://api.github.com/users/DenHeadless/gists{/gist_id}","starred_url":"https://api.github.com/users/DenHeadless/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DenHeadless/subscriptions","organizations_url":"https://api.github.com/users/DenHeadless/orgs","repos_url":"https://api.github.com/users/DenHeadless/repos","events_url":"https://api.github.com/users/DenHeadless/events{/privacy}","received_events_url":"https://api.github.com/users/DenHeadless/received_events","type":"User","site_admin":false},"created_at":"2015-02-01T19:34:59Z","updated_at":"2015-02-01T19:34:59Z","body":"I have quite different feedback for different methods, so let's split it in parts:\r\n\r\n#### Mapping to dictionary\r\n\r\nCan you describe your use case? You could simply map property without creating NSMutableDictionary.\r\n\r\n#### Mapping to primitive numbers\r\n\r\nThese methods are not needed, we already support mapping to any primitive we have( int, float, double, bool, whatever you need). This is implemented on `EKPropertyHelper` class.\r\n\r\n#### Mapping localized strings\r\n\r\nI'm not sure adding 5 methods is user-friendly here, use case is kinda limited in scope. I think it's too much for a framework.\r\n\r\n#### Mapping NSURL\r\n\r\nThis is extremely common use case and we definitely need to support this. I decided to replace a method with simple mapping blocks getter - this is implemented here: dcd286af5621cc72df3ba49c41fbe8a63fea1c7d. This is already in 0.12.0 release.\r\n\r\n#### Mapping timestamps to NSDate\r\n\r\nI still think, that mapping time intervals are not a job of a framework. This has been discussed in #78.\r\n\r\n#### Mapping locations\r\n\r\nThis seems to be a case very similar to timestamps. Introducing three new methods for this is too much. And we don't cover all use cases - which comes first, latitude or longitude? I think mapping locations with value block is good enough.\r\n\r\n#### Mapping colors\r\n\r\nThis is an interesting feature to have, but we need to be cross-platform here and support NSColor as well - EasyMapping is not iOS-only project. Right now i don't have time to implement color conversion and cover it with unit tests, but feel free to implement mapping blocks if you want - this could be a nice feature to have in EasyMapping.\r\n\r\n#### Overall\r\n\r\nOverall i think mapping blocks are a way to go, this class can be extended to have as many blocks as we need. We just need to be careful and add only most-commonly used types.\r\n\r\nThanks for feedback and contribution!"}}