{"action":"closed","issue":{"url":"https://api.github.com/repos/Microsoft/bond/issues/147","repository_url":"https://api.github.com/repos/Microsoft/bond","labels_url":"https://api.github.com/repos/Microsoft/bond/issues/147/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/bond/issues/147/comments","events_url":"https://api.github.com/repos/Microsoft/bond/issues/147/events","html_url":"https://github.com/Microsoft/bond/issues/147","id":147480861,"number":147,"title":"c# collections and IEnumerable","user":{"login":"sqmgh","id":8879792,"avatar_url":"https://avatars.githubusercontent.com/u/8879792?v=3","gravatar_id":"","url":"https://api.github.com/users/sqmgh","html_url":"https://github.com/sqmgh","followers_url":"https://api.github.com/users/sqmgh/followers","following_url":"https://api.github.com/users/sqmgh/following{/other_user}","gists_url":"https://api.github.com/users/sqmgh/gists{/gist_id}","starred_url":"https://api.github.com/users/sqmgh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sqmgh/subscriptions","organizations_url":"https://api.github.com/users/sqmgh/orgs","repos_url":"https://api.github.com/users/sqmgh/repos","events_url":"https://api.github.com/users/sqmgh/events{/privacy}","received_events_url":"https://api.github.com/users/sqmgh/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"chwarr","id":10605667,"avatar_url":"https://avatars.githubusercontent.com/u/10605667?v=3","gravatar_id":"","url":"https://api.github.com/users/chwarr","html_url":"https://github.com/chwarr","followers_url":"https://api.github.com/users/chwarr/followers","following_url":"https://api.github.com/users/chwarr/following{/other_user}","gists_url":"https://api.github.com/users/chwarr/gists{/gist_id}","starred_url":"https://api.github.com/users/chwarr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chwarr/subscriptions","organizations_url":"https://api.github.com/users/chwarr/orgs","repos_url":"https://api.github.com/users/chwarr/repos","events_url":"https://api.github.com/users/chwarr/events{/privacy}","received_events_url":"https://api.github.com/users/chwarr/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2016-04-11T16:20:33Z","updated_at":"2016-04-13T20:34:59Z","closed_at":"2016-04-13T20:34:59Z","body":"Serializing the base `T` works fine.\r\n\r\nHowever, if I try to serialize a `List<T>` it then returns 0 bytes.\r\nThis can be worked around by creating a very simple wrapper class, such as:\r\n```\r\n[Schema]\r\npublic class Wrapper<T>\r\n{\r\n    [ID(0)]\r\n    public List<T> Items { get; set; }\r\n}\r\n```\r\n\r\nReplacing `List<T>` with `IEnumerable<T>` throws a `The given key was not present in the dictionary.` error.\r\n\r\nThis leads to two questions:\r\n\r\n- Is IEnumerable not supported? Needing to call `.ToList()` every time you do anything with Linq is awfully inefficient. \r\n\r\n- I have a hunch that not being able to serialize a `List<T>` is by design, and that you are only supposed to work with data objects, rather than lists of them. While this would be very regrettable, the user experience around it is terrible. It should then throw an exception, rather than silently eating the data you pass to it and reporting that everything is a'okay."}}