title: JIRA REST API, JSON response, C#
body: <p>I want to get issues from boards and print issues's summary (using JIRA Rest API: <a href="https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/board-getIssuesForBoard" rel="nofollow">https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/board-getIssuesForBoard</a>), but i don't want to get all issue's fields, - i need fields: "sprint" and "epic".</p>
  
  <p>I have error:</p>
  
  <blockquote>
    <p>Unhandled Exception: System.NullReferenceException: Object reference
    not set to an instance of an object.</p>
  </blockquote>
  
  <p>At line:</p>
  
  <pre><code>var response = client.RestClient.ExecuteRequest&lt;ResponseIssues&gt;(Method.GET, 
                          @"/rest/agile/1.0/board/2/issue?fields='epic,sprint'");
  </code></pre>
  
  <p>Code (C#):</p>
  
  <pre><code>var client = Atlassian.Jira.Jira.CreateRestClient(jiraurl, login, password);
  var response = client.RestClient.ExecuteRequest&lt;ResponseIssues&gt;(Method.GET, 
                         @"/rest/agile/1.0/board/2/issue?fields='epic,sprint'");
  foreach (var issue in response.issues)
  {
       Console.WriteLine(issue.fields.epic.summary);
  }
  </code></pre>
  
  <p>Class ResponseIssues (C#):</p>
  
  <pre><code>public class ResponseIssues
  {
      public string expand;
      public int startAt;
      public int maxResults;
      public int total;
      public List&lt;Issue_&gt; issues;
  }    
  public class Issue_
  {
      public string expand;
      public string id;
      public string self;
      public string key;
      public Field fields;
  }    
  public class Field
  {
      public Sprint sprint;
      public Epic epic;            
  }   
  public class Sprint
  {
      public int id;
      public string self;
      public string state;
      public string name;
  }    
  public class Epic
  {
      public int id;
      public string self;
      public string name;
      public string summary;
      public Color color;
      public bool done;
  }    
  public class Color
  {
      public string key;
  }
  </code></pre>