{"action":"closed","issue":{"url":"https://api.github.com/repos/yojimbo87/ArangoDB-NET/issues/16","labels_url":"https://api.github.com/repos/yojimbo87/ArangoDB-NET/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/yojimbo87/ArangoDB-NET/issues/16/comments","events_url":"https://api.github.com/repos/yojimbo87/ArangoDB-NET/issues/16/events","html_url":"https://github.com/yojimbo87/ArangoDB-NET/issues/16","id":55446793,"number":16,"title":"Invalid Cast Exception while retrieve SortedList<int, bool> for Arango DB","user":{"login":"panglivlal","id":10703311,"avatar_url":"https://avatars.githubusercontent.com/u/10703311?v=3","gravatar_id":"","url":"https://api.github.com/users/panglivlal","html_url":"https://github.com/panglivlal","followers_url":"https://api.github.com/users/panglivlal/followers","following_url":"https://api.github.com/users/panglivlal/following{/other_user}","gists_url":"https://api.github.com/users/panglivlal/gists{/gist_id}","starred_url":"https://api.github.com/users/panglivlal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/panglivlal/subscriptions","organizations_url":"https://api.github.com/users/panglivlal/orgs","repos_url":"https://api.github.com/users/panglivlal/repos","events_url":"https://api.github.com/users/panglivlal/events{/privacy}","received_events_url":"https://api.github.com/users/panglivlal/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-26T04:55:09Z","updated_at":"2015-01-26T12:23:17Z","closed_at":"2015-01-26T12:23:17Z","body":"Hi Yojimbo87,\r\n\r\nI facing an Invalid Cast exception while try retrieve `SortedList<int, bool>` for ArangoDB.\r\n\r\nMy Class:\r\n\r\n```csharp\r\npublic class TestEntity\r\n{\r\n    public SortedList<int, bool> IsDayTypeEnabledLateness { get; set; }\r\n}\r\n```\r\n\r\nand A simple Unit Test case\r\n\r\n```csharp\r\npublic void Test_Entity_save_and_retrieve()\r\n{\r\n    Database.CreateTestCollection(Database.TestDocumentCollectionName, ACollectionType.Document);\r\n    var db = new ADatabase(Database.Alias);\r\n\r\n    var isDayTypeEnabledLateness = new SortedList<int, bool>();\r\n    isDayTypeEnabledLateness.Add(1,true);\r\n    isDayTypeEnabledLateness.Add(2,false);\r\n    isDayTypeEnabledLateness.Add(3,false);\r\n    isDayTypeEnabledLateness.Add(4,false);\r\n\r\n    var entity = new TestEntity();\r\n    entity.IsDayTypeEnabledLateness = isDayTypeEnabledLateness;\r\n\r\n    var createResult = db.Document.Create<TestEntity>(Database.TestDocumentCollectionName, entity);\r\n\r\n    Assert.IsTrue(createResult.Success);\r\n\r\n    var getresult = db.Document.Get<TestEntity>(createResult.Value.ID());\r\n\r\n    Assert.IsTrue(getresult.Success);\r\n    Assert.IsTrue(getresult.HasValue);\r\n}\r\n```"}}