{"action":"created","issue":{"url":"https://api.github.com/repos/evermeer/AlamofireJsonToObjects/issues/25","repository_url":"https://api.github.com/repos/evermeer/AlamofireJsonToObjects","labels_url":"https://api.github.com/repos/evermeer/AlamofireJsonToObjects/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/evermeer/AlamofireJsonToObjects/issues/25/comments","events_url":"https://api.github.com/repos/evermeer/AlamofireJsonToObjects/issues/25/events","html_url":"https://github.com/evermeer/AlamofireJsonToObjects/issues/25","id":168881751,"number":25,"title":"Nested Generics","user":{"login":"Twinsens","id":7265590,"avatar_url":"https://avatars.githubusercontent.com/u/7265590?v=3","gravatar_id":"","url":"https://api.github.com/users/Twinsens","html_url":"https://github.com/Twinsens","followers_url":"https://api.github.com/users/Twinsens/followers","following_url":"https://api.github.com/users/Twinsens/following{/other_user}","gists_url":"https://api.github.com/users/Twinsens/gists{/gist_id}","starred_url":"https://api.github.com/users/Twinsens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Twinsens/subscriptions","organizations_url":"https://api.github.com/users/Twinsens/orgs","repos_url":"https://api.github.com/users/Twinsens/repos","events_url":"https://api.github.com/users/Twinsens/events{/privacy}","received_events_url":"https://api.github.com/users/Twinsens/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-02T13:13:52Z","updated_at":"2016-08-03T13:23:06Z","closed_at":"2016-08-03T13:23:06Z","body":"The issue may be dublicated with EVReflection issues page. Bu I dont know where to I write. I just need help. :(\r\n\r\nHello \r\n\r\nIs that possible nested generics in EVReflection? I was tested code that the following but it not work. Could you help me about the issue?\r\n\r\n \r\n \r\n```\r\nclass ResponseModel<T:BaseModel> : EVObject,EVGenericsKVC {    \r\n     \r\n      required init() {\r\n          super.init();\r\n        }\r\n    \r\n    var success : String?;\r\n    var reason : String?\r\n    var content : [T]?;\r\n    \r\n    \r\n    internal override func setValue(value: AnyObject!, forUndefinedKey key: String) {\r\n        if(key == \"content\"){\r\n            content = value as? [T];\r\n        }\r\n    }\r\n    \r\n}\r\n\r\n\r\nclass PagerModel<T:BaseModel>: BaseModel,EVGenericsKVC{    \r\n    required init() {\r\n        super.init();\r\n    }\r\n    \r\n    var total:String?;\r\n    var per_page:String?;\r\n    var current_page:String?;\r\n    var last_page:String?;\r\n    var next_page_url:String?;\r\n    var prev_page_url:String?;\r\n    var from:String?;\r\n    var to:String?;\r\n    var data:[T]?;\r\n   \r\n    \r\n       internal  override func setValue(value: AnyObject!, forUndefinedKey key: String) {\r\n        if(key == \"data\"){\r\n        data = value  as? [T];\r\n        }\r\n    }\r\n\r\n\r\n\r\n\r\nclass BaseWebServices<T:BaseModel> : NSObject  {\r\n    \r\n    let BASE_URL : String! = \"http://localhost/IOS/public/api/v1/\";\r\n    \r\n    var listener : ResponseListener?;\r\n    \r\n    \r\n    \r\n    func executeService(serviceUrl : String, method : Alamofire.Method,parameters: [String: AnyObject]){\r\n        \r\n        let URL : String = \"\\(self.BASE_URL)\\(serviceUrl)\";\r\n        Alamofire.request(method, URL, parameters:parameters)\r\n            .responseObject { (response: Result<ResponseModel<T>, NSError>) in\r\n                \r\n                switch response{\r\n                case .Success( _)  :\r\n                    if let result : ResponseModel<T> = response.value {\r\n                        self.listener?.onResponseSuccess(result);\r\n                    }\r\n                    break;\r\n                case .Failure(let error) :\r\n                    self.listener?.onResponseFail(error)\r\n                    break;\r\n                }\r\n        }\r\n        \r\n        \r\n        \r\n    }\r\n\r\n\r\nclass NewsHeaderService: BaseWebServices<PagerModel<NewsHeader>>,ResponseListener {\r\n\r\n    override  init() {\r\n        super.init();\r\n        super.listener = self;\r\n        \r\n        \r\n        executeService(\"getNewsHeadersByPrjId/1\", method: .POST, parameters: [\"token\":Common.TOKEN_KEY])\r\n    }\r\n    \r\n    func onResponseSuccess<T : BaseModel where T : protocol<ObjectProtocol>>(object: ResponseModel<T>) {\r\n        \r\n    }\r\n   \r\n    \r\n    \r\n    func onResponseFail(failMessage: NSError) {\r\n        \r\n    }\r\n}\r\n\r\n\r\nclass NewsHeader : BaseModel{   \r\n    \r\n    var id : String?;\r\n    var Description: String?;\r\n    var newsTypeId:String?;\r\n    var newsOrder : String?;\r\n    var isCommentActive : String?;\r\n    var placeTypeId : String?;\r\n    var link : String?;\r\n    var title : String?; \r\n    var pubDate : String?;\r\n    var imageUrl : String?;\r\n    var imageThumUrl : String?;\r\n    var appId : String?;\r\n    var projectId : String?;\r\n    var isValid : String?;\r\n    var created_at : String?;\r\n    var updated_at : String?;\r\n}\r\n```\r\n    \r\nWhen I try to execute \r\n\r\n` var service : NewsHeaderService = NewsHeaderService();`\r\n\r\nThere was an error,\r\n\r\nERROR: Could not create an instance for type PagerModel<NewsHeader>\r\ndict:{\r\n    \"current_page\" = 1;\r\n    data =     (\r\n                {\r\n            appId = 1;\r\n            \"created_at\" = \"2016-06-29 12:15:23\";\r\n            description = 33333;\r\n            id = 1;\r\n            imageThumUrl = \"\";\r\n            imageUrl = \"uploads/74d41d1a8b39541ce2e7b6fc1f844ef0_04_IP-MAN-3_Courtesy-of-Well-Go-USA_0-752x440.jpg\";\r\n            isCommentActive = 1;\r\n            isValid = 1;\r\n            link = 11111;\r\n            newsOrder = 0;\r\n            newsTypeId = 2;\r\n            placeTypeId = 1;\r\n            projectId = 1;\r\n            pubDate = \"\";\r\n            title = 22222;\r\n            \"updated_at\" = \"2016-06-29 12:15:23\";\r\n        }\r\n    );\r\n    from = 1;\r\n    \"last_page\" = 1;\r\n    \"next_page_url\" = \"<null>\";\r\n    \"per_page\" = 15;\r\n    \"prev_page_url\" = \"<null>\";\r\n    to = 1;\r\n    total = 1;\r\n}\r\n\r\n\r\n\r\nIf I change `class PagerModel<T:BaseModel>` to` class PagerModel` and remove \"data\" property it works fine but I need the data :) Can anybody help me about my issue? Thanks for your time.\r\n\r\nEdit: Here is parsed JSON data\r\n\r\n{\"success\":true,\"reason\":\"OK\",\"content\":[{\"total\":1,\"per_page\":15,\"current_page\":1,\"last_page\":1,\"next_page_url\":null,\"prev_page_url\":null,\"from\":1,\"to\":1,\"data\":[{\"id\":1,\"newsTypeId\":\"2\",\"newsOrder\":\"0\",\"isCommentActive\":\"1\",\"placeTypeId\":\"1\",\"link\":\"11111\",\"title\":\"22222\",\"description\":\"33333\",\"pubDate\":\"\",\"imageUrl\":\"uploads\\/74d41d1a8b39541ce2e7b6fc1f844ef0_04_IP-MAN-3_Courtesy-of-Well-Go-USA_0-752x440.jpg\",\"imageThumUrl\":\"\",\"appId\":\"1\",\"projectId\":\"1\",\"isValid\":\"1\",\"created_at\":\"2016-06-29 12:15:23\",\"updated_at\":\"2016-06-29 12:15:23\"}]}]}"},"comment":{"url":"https://api.github.com/repos/evermeer/AlamofireJsonToObjects/issues/comments/237235493","html_url":"https://github.com/evermeer/AlamofireJsonToObjects/issues/25#issuecomment-237235493","issue_url":"https://api.github.com/repos/evermeer/AlamofireJsonToObjects/issues/25","id":237235493,"user":{"login":"evermeer","id":130834,"avatar_url":"https://avatars.githubusercontent.com/u/130834?v=3","gravatar_id":"","url":"https://api.github.com/users/evermeer","html_url":"https://github.com/evermeer","followers_url":"https://api.github.com/users/evermeer/followers","following_url":"https://api.github.com/users/evermeer/following{/other_user}","gists_url":"https://api.github.com/users/evermeer/gists{/gist_id}","starred_url":"https://api.github.com/users/evermeer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evermeer/subscriptions","organizations_url":"https://api.github.com/users/evermeer/orgs","repos_url":"https://api.github.com/users/evermeer/repos","events_url":"https://api.github.com/users/evermeer/events{/privacy}","received_events_url":"https://api.github.com/users/evermeer/received_events","type":"User","site_admin":false},"created_at":"2016-08-03T13:23:06Z","updated_at":"2016-08-03T13:23:06Z","body":"This is indeed a EVReflection issue. I will pick this up in the issue that you reported there\r\n\r\nhttps://github.com/evermeer/EVReflection/issues/114"}}
{"actor":{"display_login":"evermeer"}}