title: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected a string but was BEGIN_OBJECT at line 1 column 10 path $.data
body: <p>I am getting exception as <code>retrofit.RetrofitError: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected a string but was BEGIN_OBJECT at line 1 column 10 path $.data</code></p>
  
  <p>I am requesting data as :</p>
  
  <pre><code>        RestAdapter loginAdapter = Utils.buildAdapter();
                  final ApiConfig signUpApi = loginAdapter.create(ApiConfig.class);
                  signUpApi.signUp(new SignupDetailResponse.SignUpDetailRequestBody(email, password, AppConstants.DEVICE_TOKEN, AppConstants.DEVICE_TYPE),
                                  new Callback&lt;SignupDetailResponse.SignUpResponseBody&gt;() {
                      @Override
                      public void success(SignupDetailResponse.SignUpResponseBody signUpDetailResponse, Response response) {
                          Long responseCode = signUpDetailResponse.responseCode;
                          Utils.SHOW_TOAST(context, responseCode.toString());
                      }
  
                      @Override
                      public void failure(RetrofitError retrofitError) {
                          if (retrofitError.getResponse() != null) {
                              Log.i(TAG, retrofitError.toString());
                          }
                      }
                  });
              }
  </code></pre>
  
  <p>where in <code>Utils</code>,</p>
  
  <pre><code>public static RestAdapter buildAdapter() {
      return new RestAdapter.Builder()
              .setEndpoint(AppConfig.API_BASE_URL)
              .build();
  
  }
  </code></pre>
  
  <p>My interface :</p>
  
  <pre><code>public interface ApiConfig {
  
    @POST("/signUp")
    public void signUp(@Body SignupDetailResponse.SignUpDetailRequestBody signUpDetailRequestBody, Callback&lt;SignupDetailResponse.SignUpResponseBody&gt; signUpDetailResponseCallback);
  
  }
  </code></pre>
  
  <p>My LoginResponse:</p>
  
  <pre><code>package com.shubham.network.response;
  
  import com.google.gson.annotations.Expose;
  
  public class SignupDetailResponse {
  
   public static class SignUpDetailRequestBody {
  
      final String email;
      final String password;
      final String acType;
      final String deviceType;
  
      public SignUpDetailRequestBody(String email, String password, String acType, String deviceType) {
          this.email = email;
          this.password = password;
          this.acType = acType;
          this.deviceType = deviceType;
      }
  
  }
  
  public static class SignUpResponseBody {
  
      @Expose
      public String data;
  
      @Expose
      public Boolean success;
  
      @Expose
      public String message;
  
      @Expose
      public Long responseCode;
  
      /**
       * @return The data
       */
      public String getData() {
          return data;
      }
  
      /**
       * @return The success
       */
      public Boolean getSuccess() {
          return success;
      }
  
      /**
       * @return The message
       */
      public String getMessage() {
          return message;
      }
  
      /**
       * @return The responseCode
       */
      public Long getResponseCode() {
          return responseCode;
      }
  }
  }
  </code></pre>
  
  <p>Expected JSON response :</p>
  
  <pre><code>{
  "data": "1",
  "success": true,
  "message": "You have successfully SignUp. Please login to your registered email and activate your account",
  "responseCode": 8
  }
  </code></pre>
  
  <p>I think I have build my model correctly. I have also added retrofit(1.9.0) and gson(2.3.1) JARS in my project.</p>