title: Caused by: com.google.gson.stream.MalformedJsonException: Expected EOF at line 1 column 21
body: <p>I am trying to run the sample java program to retrieve the top 5 defects from rally. I am getting the following error:</p>
  
  <pre>
  Querying for top 5 highest priority unfixed defects...
  Exception in thread "main" com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Expected EOF at line 1 column 21
      at com.google.gson.JsonParser.parse(JsonParser.java:65)
      at com.google.gson.JsonParser.parse(JsonParser.java:45)
      at com.rallydev.rest.response.Response.(Response.java:25)
      at com.rallydev.rest.response.QueryResponse.(QueryResponse.java:16)
      at com.rallydev.rest.RallyRestApi.query(RallyRestApi.java:179)
      at QueryExample.main(QueryExample.java:36)
  Caused by: com.google.gson.stream.MalformedJsonException: Expected EOF at line 1 column 21
      at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1298)
      at com.google.gson.stream.JsonReader.peek(JsonReader.java:390)
      at com.google.gson.JsonParser.parse(JsonParser.java:60)
      ... 5 more
  </pre>
  
  <p>The source code is listed below:</p>
  
  <pre><code>import com.google.gson.JsonElement;
  import com.google.gson.JsonObject;
  import com.rallydev.rest.RallyRestApi;
  import com.rallydev.rest.request.QueryRequest;
  import com.rallydev.rest.response.QueryResponse;
  import com.rallydev.rest.util.Fetch;
  import com.rallydev.rest.util.QueryFilter;
  import java.io.IOException;
  import java.net.URI;
  import java.net.URISyntaxException;
  
  
  
  public class QueryExample {
  
      public static void main(String[] args) throws URISyntaxException, IOException {
  
          //Create and configure a new instance of RallyRestApi
          RallyRestApi restApi = new RallyRestApi(new URI("https://rally1.rallydev.com/#/4608446320ud"), "stephen5@netapp.com", "password");
          restApi.setApplicationName("QueryExample");
  
          try {
  
              System.out.println("Querying for top 5 highest priority unfixed defects...");
  
              QueryRequest defects = new QueryRequest("defect");
  
              defects.setFetch(new Fetch("FormattedID", "Name", "State", "Priority"));
              defects.setQueryFilter(new QueryFilter("State", "&lt;", "Fixed"));
              defects.setOrder("Priority ASC,FormattedID ASC");
  
              //Return up to 5, 1 per page
              defects.setPageSize(1);
              defects.setLimit(5);
  
              QueryResponse queryResponse = restApi.query(defects);
              if (queryResponse.wasSuccessful()) {
                  System.out.println(String.format("\nTotal results: %d", queryResponse.getTotalResultCount()));
                  System.out.println("Top 5:");
                  for (JsonElement result : queryResponse.getResults()) {
                      JsonObject defect = result.getAsJsonObject();
                      System.out.println(String.format("\t%s - %s: Priority=%s, State=%s",
                      defect.get("FormattedID").getAsString(),
                      defect.get("Name").getAsString(),
                      defect.get("Priority").getAsString(),
                      defect.get("State").getAsString()));
                  }
              } else {
                  System.err.println("The following errors occurred: ");
                  for (String err : queryResponse.getErrors()) {
                      System.err.println("\t" + err);
                  }
              }
  
          } finally {
              //Release resources
              restApi.close();
          }
      }
  }          
  </code></pre>
  
  <p>Any help on what's causing this is greatly appreciated! </p>