GetProjectMeta exception due to bad deserializing
The API works, it has access to a lot of stuff (i.e. projects) but when I read the project meta I receive an object that has expand equal to "projects", but the projects list empty. The output of the API seems to be similar to the structure of the IssueCreateMeta class, except for a new entry "avatarUrls" that appears in the output, but not in the class. "projects": [{ "self": "https://...", "id": "12201", "key": "GSI", "name": "My Project", "avatarUrls": { "16x16": "https://.../jira/secure/projectavatar?size=small&pid=12201&avatarId=26010", "48x48": "https://.../jira/secure/projectavatar?pid=12201&avatarId=26010" }, "issuetypes": [...]
I have tried to add it in ProjectMeta as a list of AvatarUrl: [DataContract] [Serializable] public class AvatarUrl { [DataMember(Name = "16x16")] public string square16 { get; set; } [DataMember(Name = "48x48")] public string square48 { get; set; } } , but it didn't work. The exception is: System.ArgumentOutOfRangeException was unhandled by user code HResult=-2146233086 Message=Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index Source=mscorlib ParamName=index StackTrace: at System.ThrowHelper.ThrowArgumentOutOfRangeException() at System.Collections.Generic.List`1.get_Item(Int32 index) at AnotherJiraRestClient.JiraClient.GetProjectMeta(String projectKey) in c:!Projects\JiraLog4netAppender\AnotherJiraRestClient\JiraClient.cs:line 183
Sorry, no problem there. It was a rights issue with the user and the projects were empty...