{"action":"closed","issue":{"url":"https://api.github.com/repos/icanzilb/JSONModel/issues/316","labels_url":"https://api.github.com/repos/icanzilb/JSONModel/issues/316/labels{/name}","comments_url":"https://api.github.com/repos/icanzilb/JSONModel/issues/316/comments","events_url":"https://api.github.com/repos/icanzilb/JSONModel/issues/316/events","html_url":"https://github.com/icanzilb/JSONModel/issues/316","id":69692995,"number":316,"title":"Custom transformer for CLLocationCoordinate2D?","user":{"login":"guilhermearaujo","id":1733143,"avatar_url":"https://avatars.githubusercontent.com/u/1733143?v=3","gravatar_id":"","url":"https://api.github.com/users/guilhermearaujo","html_url":"https://github.com/guilhermearaujo","followers_url":"https://api.github.com/users/guilhermearaujo/followers","following_url":"https://api.github.com/users/guilhermearaujo/following{/other_user}","gists_url":"https://api.github.com/users/guilhermearaujo/gists{/gist_id}","starred_url":"https://api.github.com/users/guilhermearaujo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guilhermearaujo/subscriptions","organizations_url":"https://api.github.com/users/guilhermearaujo/orgs","repos_url":"https://api.github.com/users/guilhermearaujo/repos","events_url":"https://api.github.com/users/guilhermearaujo/events{/privacy}","received_events_url":"https://api.github.com/users/guilhermearaujo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-04-20T22:12:50Z","updated_at":"2015-12-17T11:46:46Z","closed_at":"2015-12-17T11:46:46Z","body":"I was trying to implement a custom transformer for CLLocationCoordinate2D based on [CGStructs Transformers](https://github.com/JSONModel/CGStructs_Transformers).\r\n\r\nThe JSON I am working with provides a coordinate like this:\r\n\r\n```json\r\n{\r\n  \"location\": {\r\n    \"longitude\": -73.769264,\r\n    \"latitude\": 47.699343\r\n  }\r\n}\r\n```\r\n\r\nI tried writing this transformer:\r\n\r\n```obj-c\r\n- (CLLocationCoordinate2D)CLLocationCoordinate2DFromNSDictionary:(NSDictionary *)dictionary {\r\n  return CLLocationCoordinate2DMake([dictionary[@\"latitude\"] doubleValue],\r\n                                    [dictionary[@\"longitude\"] doubleValue]);\r\n}\r\n```\r\n\r\nBut after I check that the method would never be called (and the fact that the app crashes), I noticed that when JSONModel try to look up a custom transformer, it attempts to find a selector called `{FromNSDictionary:`. Since a method with that name is impossible, what I was doing would definitely never work.\r\n\r\nSo is it possible to work with CLLocationCoordinate2D or should I just quit and write a custom class (or any of the other workarounds)?"}}