title: Exception throw when try to parse Json to Java Object with Gson Library
body: <p>im trying create a web method whos get a Json string. I need to get that json string and parse to a java object.</p>
  
  <p>When im trying to do that i get that exception:</p>
  
  <pre><code>javax.servlet.ServletException: com.google.gson.JsonSyntaxException: 
  java.io.EOFException: End of input at line 1 column 2
  </code></pre>
  
  <p>root cause </p>
  
  <pre><code>com.google.gson.JsonSyntaxException: java.io.EOFException: End of input at 
  line 1 column 2
  </code></pre>
  
  <p>root cause </p>
  
  <pre><code> java.io.EOFException: End of input at line 1 column 2
  </code></pre>
  
  <p>And is that my code:</p>
  
  <pre><code>@GET
  @Produces("application/text")
  @Path("checkuser/{user}")
  public String checkUser(@PathParam("user") String mu) throws SQLException, ClassNotFoundException {
  
      gson = new Gson();
      modelUserGet = gson.fromJson(mu, ModelUser.class);
  
      StringBuilder query = new StringBuilder();
  
      query.append("SELECT user, password, email,");
      query.append(" telephone, creation_data, last_update_data ");
      query.append("FROM user ");
      query.append("WHERE user ='");
      query.append(modelUserGet.getUser());
      query.append("' ");
  
      datamysql = new DataMySqlAccess();
      Statement st = datamysql.getConnection().createStatement();
      ResultSet rs = st.executeQuery(query.toString());
  
  
  
      String result = "";
  
      if(rs.next() == true){
  
          modelUserSend = new ModelUser(
                  rs.getString("user"),
                  rs.getString("password"),
                  rs.getString("email"),
                  rs.getString("telephone"),
                  rs.getString("creation_data"),
                  rs.getString("last_update_data")
          );
  
          if(!modelUserSend.getPassword().equals(modelUserGet.getPassword()))
              result = "INVALID_PASSWORD";
          else
              result = "OK";
      } else 
          result = "INVALID_USER";
  
  
      modelUserSend.setCheckUserReponse(result);
  
      return gson.toJson(modelUserSend);
  }
  </code></pre>
  
  <p>And this is my model class</p>
  
  <pre><code>private String user;
  private String password;
  private String email;
  private String telephone;
  private String creationData;
  private String lastUpdateData;
  private String checkUserResponse;
  
  public ModelUser(String user, String password, String email, String telephone, String creationData, String lastUpdateData){
      this.user = user;
      this.password = password;
      this.email = email;
      this.telephone = telephone;
      this.creationData = creationData;
      this.lastUpdateData = lastUpdateData;
  }
  </code></pre>
  
  <p>And im sending that parameter json string</p>
  
  <pre><code>{
      "user":"admin",
      "password": "admin",
      "email":"admin@admin.com",
      "telephone":"(11) 3761-5292",
      "creationData":"2018-07-08",
      "lastUpdateData":"2018-07-08"
  }
  </code></pre>
  
  <p>Im i doing something wrong?</p>
  
  <p>Thx. o/</p>