{"action":"closed","issue":{"url":"https://api.github.com/repos/dart-lang/json_serializable/issues/54","repository_url":"https://api.github.com/repos/dart-lang/json_serializable","labels_url":"https://api.github.com/repos/dart-lang/json_serializable/issues/54/labels{/name}","comments_url":"https://api.github.com/repos/dart-lang/json_serializable/issues/54/comments","events_url":"https://api.github.com/repos/dart-lang/json_serializable/issues/54/events","html_url":"https://github.com/dart-lang/json_serializable/issues/54","id":263497649,"node_id":"MDU6SXNzdWUyNjM0OTc2NDk=","number":54,"title":"Consider supporting `Set`s in constructors","user":{"login":"jakemac53","id":984921,"node_id":"MDQ6VXNlcjk4NDkyMQ==","avatar_url":"https://avatars3.githubusercontent.com/u/984921?v=4","gravatar_id":"","url":"https://api.github.com/users/jakemac53","html_url":"https://github.com/jakemac53","followers_url":"https://api.github.com/users/jakemac53/followers","following_url":"https://api.github.com/users/jakemac53/following{/other_user}","gists_url":"https://api.github.com/users/jakemac53/gists{/gist_id}","starred_url":"https://api.github.com/users/jakemac53/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakemac53/subscriptions","organizations_url":"https://api.github.com/users/jakemac53/orgs","repos_url":"https://api.github.com/users/jakemac53/repos","events_url":"https://api.github.com/users/jakemac53/events{/privacy}","received_events_url":"https://api.github.com/users/jakemac53/received_events","type":"User","site_admin":false},"labels":[{"id":706073786,"node_id":"MDU6TGFiZWw3MDYwNzM3ODY=","url":"https://api.github.com/repos/dart-lang/json_serializable/labels/S2%20medium","name":"S2 medium","color":"fef2c0","default":false},{"id":650855598,"node_id":"MDU6TGFiZWw2NTA4NTU1OTg=","url":"https://api.github.com/repos/dart-lang/json_serializable/labels/State:%20help%20wanted","name":"State: help wanted","color":"159818","default":false},{"id":650855599,"node_id":"MDU6TGFiZWw2NTA4NTU1OTk=","url":"https://api.github.com/repos/dart-lang/json_serializable/labels/Type:%20enhancement","name":"Type: enhancement","color":"84b6eb","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-10-06T16:10:24Z","updated_at":"2018-09-04T16:37:10Z","closed_at":"2018-09-04T16:37:10Z","author_association":"CONTRIBUTOR","body":"Consider a class like:\r\n\r\n```\r\nclass MyThing {\r\n  final Set<int> myInts;\r\n\r\n  MyThing(this.myInts);\r\n}\r\n```\r\n\r\nToday the generated `fromJson` constructor would end up trying to pass in an `Iterable<int>` to the constructor, which won't work. The workaround is:\r\n\r\n```\r\nclass MyThing {\r\n  final Set<int> myInts;\r\n\r\n  MyThing(Iterable<int> myInts) : this.myInts = myInts.toSet();\r\n}\r\n```\r\n\r\n...but ideally that wouldn't be necessary :).\r\n\r\nfwiw, for `List` fields it will automatically call `toList` on the iterable before passing it in."}}
{"actor":{"display_login":"kevmoo"}}