title: JIRA Xray- Not a JSON Object error while making Rest API call to get Execution details
body: <p>Please help
  I am trying to fetch all tests associated with Execution in JIRA XRAY</p>
  <p>I am getting java.lang.IllegalStateException: Not a JSON Object error at step mentioned in last below(element.getAsJsonObject();)</p>
  <pre><code>String urlString=baseServerURL+&quot;/rest/raven/latest/api/testexec/&quot;+executionCycleKey+&quot;/test&quot;;
                  System.out.println(urlString);
                  HttpURLConnection con = getConnection(urlString, &quot;GET&quot;);
                  BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
                  String inputLine;
                  StringBuffer content = new StringBuffer();
                  while ((inputLine = in.readLine()) != null) {
                      System.out.println(inputLine.toString());
                      content.append(inputLine);
                  }
                  in.close();
                  con.disconnect();
                  Gson g = new Gson();
                  JsonElement element = g.fromJson(content.toString(), JsonElement.class);
                  JsonObject jsonObj = element.getAsJsonObject();
  </code></pre>
  <p>Note: inputLine prints as [{&quot;id&quot;:100806,&quot;status&quot;:&quot;TODO&quot;,&quot;key&quot;:&quot;ST_MABC-1234&quot;,&quot;rank&quot;:1}]</p>