{"action":"created","issue":{"url":"https://api.github.com/repos/JohnSundell/Unbox/issues/50","repository_url":"https://api.github.com/repos/JohnSundell/Unbox","labels_url":"https://api.github.com/repos/JohnSundell/Unbox/issues/50/labels{/name}","comments_url":"https://api.github.com/repos/JohnSundell/Unbox/issues/50/comments","events_url":"https://api.github.com/repos/JohnSundell/Unbox/issues/50/events","html_url":"https://github.com/JohnSundell/Unbox/pull/50","id":151701436,"number":50,"title":"Skip invalid data instead of exiting completely v3","user":{"login":"JohnSundell","id":2466701,"avatar_url":"https://avatars.githubusercontent.com/u/2466701?v=3","gravatar_id":"","url":"https://api.github.com/users/JohnSundell","html_url":"https://github.com/JohnSundell","followers_url":"https://api.github.com/users/JohnSundell/followers","following_url":"https://api.github.com/users/JohnSundell/following{/other_user}","gists_url":"https://api.github.com/users/JohnSundell/gists{/gist_id}","starred_url":"https://api.github.com/users/JohnSundell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohnSundell/subscriptions","organizations_url":"https://api.github.com/users/JohnSundell/orgs","repos_url":"https://api.github.com/users/JohnSundell/repos","events_url":"https://api.github.com/users/JohnSundell/events{/privacy}","received_events_url":"https://api.github.com/users/JohnSundell/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-28T17:39:23Z","updated_at":"2016-04-28T22:20:34Z","closed_at":"2016-04-28T18:03:33Z","pull_request":{"url":"https://api.github.com/repos/JohnSundell/Unbox/pulls/50","html_url":"https://github.com/JohnSundell/Unbox/pull/50","diff_url":"https://github.com/JohnSundell/Unbox/pull/50.diff","patch_url":"https://github.com/JohnSundell/Unbox/pull/50.patch"},"body":"Implement support for partial unboxing of arrays of dictionaries - using a `allowInvalidElements` parameter (that defaults to `false`). If the parameter is set to `true`, Unbox will skip invalid elements instead of returning a `nil` array or causing the unboxing process to fail.\r\n\r\nHuge thanks to @acecilia & @basememara for their original implementations! 🎉 🚀  "},"comment":{"url":"https://api.github.com/repos/JohnSundell/Unbox/issues/comments/215580029","html_url":"https://github.com/JohnSundell/Unbox/pull/50#issuecomment-215580029","issue_url":"https://api.github.com/repos/JohnSundell/Unbox/issues/50","id":215580029,"user":{"login":"JohnSundell","id":2466701,"avatar_url":"https://avatars.githubusercontent.com/u/2466701?v=3","gravatar_id":"","url":"https://api.github.com/users/JohnSundell","html_url":"https://github.com/JohnSundell","followers_url":"https://api.github.com/users/JohnSundell/followers","following_url":"https://api.github.com/users/JohnSundell/following{/other_user}","gists_url":"https://api.github.com/users/JohnSundell/gists{/gist_id}","starred_url":"https://api.github.com/users/JohnSundell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohnSundell/subscriptions","organizations_url":"https://api.github.com/users/JohnSundell/orgs","repos_url":"https://api.github.com/users/JohnSundell/repos","events_url":"https://api.github.com/users/JohnSundell/events{/privacy}","received_events_url":"https://api.github.com/users/JohnSundell/received_events","type":"User","site_admin":false},"created_at":"2016-04-28T22:20:34Z","updated_at":"2016-04-28T22:20:34Z","body":"@acecilia Why not just do:\r\n```\r\nlet items: [Model] = try Unbox(data, allowInvalidElements: true)\r\n```\r\nThe catch block can then handle the case of invalid data (in case the `NSData` didn't decode into an array)."}}