title: GSON - JsonSyntaxException - Expected name at line 7 column 4
body: <p>I have the following result class whose object is to be returned as JSON.</p>
  
  <pre><code>public class Result {
      public String objectid;
      public String dtype;
      public String type;
      public String name;
      public String description;
  
      public Result() {
          this.objectid = "";
          this.dtype= "";
          this.type="";
          this.name= "";
          this.description = "";
      }
  
      public String getObjectid() {
          return objectid;
      }
  
      public void setObjectid(String s) {
          this.objectid = s;
      }
  
      public String getDtype() {
          return dtype;
      }
  
      public void setDtype(String s) {
          this.dtype= s;
      }
  
      public String getType() {
          return type;
      }
  
      public void setType(String s) {
          this.type = s;
      }
  
      public String getName() {
          return name;
      }
  
      public void setName(String s) {
          this.name = s;
      }
  
      public String getDescription() {
          return description;
      }
  
      public void setDescription(String s) {
          this.description = s;
      }
  
  }
  </code></pre>
  
  <p>I have a configuration json which is read my the main .java and returned as json as HTTP RESPONSE. It is as below:</p>
  
  <pre><code>{
          "objectid" : "test",
          "dtype" : "test",
          "type" : "test",
          "name" : "test",
          "description" : "test" // removed
  },
  {
          "objectid" : "test",
          "dtype" : "test",
          "type" : "test",
          "name" : "test",
          "description" : "test"
  }
  </code></pre>
  
  <p>Main .java</p>
  
  <p>Using Gson, it reads the configuration.json file and has to return a json.</p>
  
  <p>My code:</p>
  
  <pre><code>Gson g = new Gson();
  Result r = g.fromJson(res.toString(), Result.class);
  </code></pre>
  
  <p>where <code>res.toString()</code> gets me the configuration.json file content as string.</p>
  
  <p>My problem:</p>
  
  <p>I am experiencing the following exception:</p>
  
  <blockquote>
    <p>Exception com.google.gson.JsonSyntaxException:   com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 7 column 3<br>
    com.google.gson.JsonSyntaxException:   com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 7 column 3</p>
  </blockquote>
  
  <p>Any pointers?</p>