title: Expected BEGIN_OBJECT but was STRING at line 1 - Retrofit 2
body: <p>I am trying to get and Post Data using Retrofit But it Throws Exception <strong>Fsaailurecom.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $</strong>
  I tried all possible solutions suggested by the StackOverflow community but still the Problem Exits :(
  Any Help..!!</p>
  
  <p>PS: In brwoser and Localhost i can able to get the Correct Json Response for the <a href="http://onesignaldemo.rf.gd/test/get_user.php" rel="nofollow noreferrer">API call</a> <a href="http://onesignaldemo.rf.gd/test/get_user.php" rel="nofollow noreferrer">http://onesignaldemo.rf.gd/test/get_user.php</a> . In postman it returns <strong>This site requires Javascript to work, please enable Javascript in your browser or use a browser with Javascript support</strong> </p>
  
  <p><strong>API CALL</strong></p>
  
  <pre><code>private void getUsersFromDB() {
          userservice= ApiUtils.getUserservice();
          userservice.getUsers().enqueue(new Callback&lt;UserResponse&gt;() {
              @Override
              public void onResponse(Call&lt;UserResponse&gt; call, Response&lt;UserResponse&gt; response) {
                  Log.d("RESULT", "onResponse: --------------------------------SUCCESS");
                  List&lt;Result&gt; userresponses = response.body().getResult();
                  Log.d("ANS", "Number of movies received: " + userresponses.size());
  
              }
  
              @Override
              public void onFailure(Call&lt;UserResponse&gt; call, Throwable t) {
                  Log.d("RESULT", "onResponse: --------------------------------Failure" +t);
  
              }
          });
  
  
      }
  </code></pre>
  
  <p><strong>UserModal.java</strong></p>
  
  <pre><code>public class UserModel {
  
      @SerializedName("id")
      @Expose
      private String id;
      @SerializedName("user_name")
      @Expose
      private String userName;
      @SerializedName("user_password")
      @Expose
      private String userPassword;
  
      public String getId() {
          return id;
      }
  
      public void setId(String id) {
          this.id = id;
      }
  
      public String getUserName() {
          return userName;
      }
  
      public void setUserName(String userName) {
          this.userName = userName;
      }
  
      public String getUserPassword() {
          return userPassword;
      }
  
      public void setUserPassword(String userPassword) {
          this.userPassword = userPassword;
      }
  
  }
  </code></pre>
  
  <p><strong>UserResponse.java</strong></p>
  
  <pre><code>public class UserResponse {
  
      @SerializedName("result")
      @Expose
      private List&lt;Result&gt; result = null;
      @SerializedName("error_code")
      @Expose
      private Integer errorCode;
  
      public List&lt;Result&gt; getResult() {
          return result;
      }
  
      public void setResult(List&lt;Result&gt; result) {
          this.result = result;
      }
  
      public Integer getErrorCode() {
          return errorCode;
      }
  
      public void setErrorCode(Integer errorCode) {
          this.errorCode = errorCode;
      }
  }
  </code></pre>
  
  <p><strong>Interface</strong></p>
  
  <pre><code>public interface UserService {
      @GET("/get_user.php")
      Call&lt;UserResponse&gt; getUsers();
  
      @FormUrlEncoded
      @POST("/insert_user.php")
      Call&lt;DBResponse&gt; insertUsers(@Field("user_name") String username,
                                   @Field("user_password") String userpassword);
  }
  </code></pre>
  
  <p>This is my Json</p>
  
  <pre><code>{"result":[{"Users":{"id":"1","user_name":"raj","user_password":"rajesh123"}},{"Users":{"id":"2","user_name":"raj","user_password":"rajesh123"}},{"Users":{"id":"3","user_name":"raj","user_password":"rajesh123"}},{"Users":{"id":"4","user_name":"raj","user_password":"rajesh123"}},{"Users":{"id":"5","user_name":"raj","user_password":"rajesh123"}},{"Users":{"id":"6","user_name":"raj","user_password":"rajesh123"}},{"Users":{"id":"7","user_name":"raj","user_password":"rajesh123"}},{"Users":{"id":"8","user_name":"raj","user_password":"rajesh123"}},{"Users":{"id":"9","user_name":"raj","user_password":"rajesh123"}},{"Users":{"id":"10","user_name":"raj","user_password":"rajesh123"}},{"Users":{"id":"11","user_name":"raj","user_password":"rajesh123"}},{"Users":{"id":"12","user_name":"raj","user_password":"rajesh123"}}]}
  </code></pre>