title: Error while calling service with retrofit Expected BEGIN_ARRAY but was STRING at line 1 column 1 path $
body: <p>I'm struggling with this error since days. I've already tried to Clean Project and Rebuild it, but it didn't work for me.</p>
  <p>Here is my retrofit call</p>
  <pre><code>@Headers(&quot;Content-Tyoe: application/json&quot;)
  @GET(&quot;api/formchecks/available/job/{id}&quot;)
  Call&lt;List&lt;FormCheckList&gt;&gt; getAvailableFormCheckListsByJob(@Path(&quot;id&quot;) int id, @Header(&quot;Authorization&quot;) String auth);
  </code></pre>
  <p>My gson and retrofit declaration:</p>
  <pre><code>Gson gson = new GsonBuilder()
          .setLenient()
          .create();
  
  private List&lt;FormCheckList&gt; checks;
  
  retrofit = new Retrofit.Builder()
              .baseUrl(RetrofitInterface.API_BASE_URL)
              .addConverterFactory(GsonConverterFactory.create(gson))
              .build();
  </code></pre>
  <p>My call.enqueue</p>
  <pre><code> RetrofitInterface service = retrofit.create(RetrofitInterface.class);        
   Call&lt;List&lt;FormCheckList&gt;&gt; call = service.getAvailableFormCheckListsByJob(id, auth);
   call.enqueue(new Callback&lt;List&lt;FormCheckList&gt;&gt;() {
          @Override
          public void onResponse(Call&lt;List&lt;FormCheckList&gt;&gt; call, Response&lt;List&lt;FormCheckList&gt;&gt; response) {
              
              ErrorResponse res;
              Log.d(&quot;HERE&quot;, &quot;CHECKS: &quot; + (response.body() != null));
              switch (response.code()) {
                  case 404:
  
                      try {
                          res = gson.fromJson(response.errorBody().string(), ErrorResponse.class);
                          customAlert.setTxtAlert(res.message);
                          customAlert.setType(&quot;info&quot;);
                          customAlert.startLoadingDialog();
                      } catch (IOException e) {
                          Log.d(&quot;HERE2&quot;, &quot;checks &quot; + response.body());
                          e.printStackTrace();
                          customAlert.setTxtAlert(e.getMessage());
                          customAlert.setType(&quot;error&quot;);
                          customAlert.startLoadingDialog();
                      }
  
                      break;
                  case 400:
                      try {
                          res = gson.fromJson(response.errorBody().string(), ErrorResponse.class);
                          customAlert.setTxtAlert(res.message);
                          customAlert.setType(&quot;warning&quot;);
                          customAlert.startLoadingDialog();
                      } catch (IOException e) {
                          Log.d(&quot;HERE1&quot;, &quot;checks &quot; + response.body());
                          e.printStackTrace();
                          customAlert.setTxtAlert(e.getMessage());
                          customAlert.setType(&quot;error&quot;);
                          customAlert.startLoadingDialog();
                      }
                      break;
                  case 200:                        
                      checks = response.body();                        
                      break;
                  default:
                      break;
              }
  
          }
  
          @Override
          public void onFailure(Call&lt;List&lt;FormCheckList&gt;&gt; call, Throwable t) {                
              customAlert.setTxtAlert(t.getMessage());
              customAlert.setType(&quot;error&quot;);
              customAlert.startLoadingDialog();
          }
      });
  </code></pre>
  <p>My response model from Postman</p>
  <pre><code>[
  {
      &quot;id&quot;: 119,
      &quot;formParamSetupId&quot;: 8893,
      &quot;formParamSetup&quot;: {
          &quot;id&quot;: 8893,
          &quot;referIndex&quot;: &quot;1.1&quot;,
          &quot;formParam&quot;: {
              &quot;id&quot;: 3,
              &quot;description&quot;: &quot;Larghezza&quot;,
              &quot;lastUpdate&quot;: &quot;2020-08-24T08:52:05.0300464&quot;
          },
          &quot;paramExtraValue&quot;: &quot;SPC&quot;,
          &quot;dimensionalSurvey&quot;: {
              &quot;value&quot;: 24.8,
              &quot;posTolerance&quot;: 0.5,
              &quot;negTolerance&quot;: 0.25,
              &quot;surveyType&quot;: null
          }
      },
      &quot;formCheckListTimer&quot;: null,
      &quot;formCheckListQualityCheck&quot;: null,
      &quot;insertDate&quot;: &quot;2021-11-08T12:23:18.0303808&quot;
  },
  {
      &quot;id&quot;: 120,
      &quot;formParamSetupId&quot;: 8894,
      &quot;formParamSetup&quot;: {
          &quot;id&quot;: 8894,
          &quot;referIndex&quot;: &quot;1.2&quot;,
          &quot;formParam&quot;: {
              &quot;id&quot;: 5,
              &quot;description&quot;: &quot;Verifica cavità contatto&quot;,
              &quot;lastUpdate&quot;: &quot;2020-08-24T08:52:05.0696232&quot;
          },
          &quot;paramExtraValue&quot;: null,
          &quot;dimensionalSurvey&quot;: null
      },
      &quot;formCheckListTimer&quot;: null,
      &quot;formCheckListQualityCheck&quot;: null,
      &quot;insertDate&quot;: &quot;2021-11-08T12:23:18.0330752&quot;
  },
  {
      &quot;id&quot;: 121,
      &quot;formParamSetupId&quot;: 8895,
      &quot;formParamSetup&quot;: {
          &quot;id&quot;: 8895,
          &quot;referIndex&quot;: &quot;1.3&quot;,
          &quot;formParam&quot;: {
              &quot;id&quot;: 90,
              &quot;description&quot;: &quot;Verifica assenza di bava imbocco cavità contatto&quot;,
              &quot;lastUpdate&quot;: &quot;2020-08-31T12:04:00&quot;
          },
          &quot;paramExtraValue&quot;: null,
          &quot;dimensionalSurvey&quot;: null
      },
      &quot;formCheckListTimer&quot;: null,
      &quot;formCheckListQualityCheck&quot;: null,
      &quot;insertDate&quot;: &quot;2021-11-08T12:23:18.0355646&quot;
  },
  {
      &quot;id&quot;: 122,
      &quot;formParamSetupId&quot;: 8896,
      &quot;formParamSetup&quot;: {
          &quot;id&quot;: 8896,
          &quot;referIndex&quot;: &quot;2.1&quot;,
          &quot;formParam&quot;: {
              &quot;id&quot;: 38,
              &quot;description&quot;: &quot;Verifica assenza di : bruciature,crepe,bave,incompletezze,deformazioni&quot;,
              &quot;lastUpdate&quot;: &quot;2020-08-24T08:52:05.7714885&quot;
          },
          &quot;paramExtraValue&quot;: null,
          &quot;dimensionalSurvey&quot;: null
      },
      &quot;formCheckListTimer&quot;: null,
      &quot;formCheckListQualityCheck&quot;: null,
      &quot;insertDate&quot;: &quot;2021-11-08T12:23:18.0381673&quot;
  },
  {
      &quot;id&quot;: 123,
      &quot;formParamSetupId&quot;: 8897,
      &quot;formParamSetup&quot;: {
          &quot;id&quot;: 8897,
          &quot;referIndex&quot;: &quot;2.2&quot;,
          &quot;formParam&quot;: {
              &quot;id&quot;: 51,
              &quot;description&quot;: &quot;Verifica inserimento controparte&quot;,
              &quot;lastUpdate&quot;: &quot;2020-08-24T08:52:06.0401384&quot;
          },
          &quot;paramExtraValue&quot;: &quot;maschio (vedere ciclo)&quot;,
          &quot;dimensionalSurvey&quot;: null
      },
      &quot;formCheckListTimer&quot;: null,
      &quot;formCheckListQualityCheck&quot;: null,
      &quot;insertDate&quot;: &quot;2021-11-08T12:23:18.0405131&quot;
  },
  {
      &quot;id&quot;: 124,
      &quot;formParamSetupId&quot;: 8898,
      &quot;formParamSetup&quot;: {
          &quot;id&quot;: 8898,
          &quot;referIndex&quot;: &quot;2.3&quot;,
          &quot;formParam&quot;: {
              &quot;id&quot;: 54,
              &quot;description&quot;: &quot;Verifica inserimento wedge&quot;,
              &quot;lastUpdate&quot;: &quot;2020-08-24T08:52:06.1074036&quot;
          },
          &quot;paramExtraValue&quot;: &quot;female 54200225&quot;,
          &quot;dimensionalSurvey&quot;: null
      },
      &quot;formCheckListTimer&quot;: null,
      &quot;formCheckListQualityCheck&quot;: null,
      &quot;insertDate&quot;: &quot;2021-11-08T12:23:18.0429302&quot;
  },
  {
      &quot;id&quot;: 125,
      &quot;formParamSetupId&quot;: 8899,
      &quot;formParamSetup&quot;: {
          &quot;id&quot;: 8899,
          &quot;referIndex&quot;: &quot;2.4&quot;,
          &quot;formParam&quot;: {
              &quot;id&quot;: 55,
              &quot;description&quot;: &quot;Verifica inserimento CPA&quot;,
              &quot;lastUpdate&quot;: &quot;2020-08-24T08:52:06.1264616&quot;
          },
          &quot;paramExtraValue&quot;: &quot;54200003&quot;,
          &quot;dimensionalSurvey&quot;: null
      },
      &quot;formCheckListTimer&quot;: null,
      &quot;formCheckListQualityCheck&quot;: null,
      &quot;insertDate&quot;: &quot;2021-11-08T12:23:18.0453145&quot;
  },
  {
      &quot;id&quot;: 126,
      &quot;formParamSetupId&quot;: 8900,
      &quot;formParamSetup&quot;: {
          &quot;id&quot;: 8900,
          &quot;referIndex&quot;: &quot;2.5&quot;,
          &quot;formParam&quot;: {
              &quot;id&quot;: 56,
              &quot;description&quot;: &quot;Verifica inserimento retainer&quot;,
              &quot;lastUpdate&quot;: &quot;2020-08-24T08:52:06.1456205&quot;
          },
          &quot;paramExtraValue&quot;: &quot;54200234&quot;,
          &quot;dimensionalSurvey&quot;: null
      },
      &quot;formCheckListTimer&quot;: null,
      &quot;formCheckListQualityCheck&quot;: null,
      &quot;insertDate&quot;: &quot;2021-11-08T12:23:18.0476976&quot;
  },
  {
      &quot;id&quot;: 127,
      &quot;formParamSetupId&quot;: 8901,
      &quot;formParamSetup&quot;: {
          &quot;id&quot;: 8901,
          &quot;referIndex&quot;: &quot;2.6&quot;,
          &quot;formParam&quot;: {
              &quot;id&quot;: 62,
              &quot;description&quot;: &quot;Verifica polarizzazione&quot;,
              &quot;lastUpdate&quot;: &quot;2020-08-24T08:52:06.2752349&quot;
          },
          &quot;paramExtraValue&quot;: null,
          &quot;dimensionalSurvey&quot;: null
      },
      &quot;formCheckListTimer&quot;: null,
      &quot;formCheckListQualityCheck&quot;: null,
      &quot;insertDate&quot;: &quot;2021-11-08T12:23:18.050052&quot;
  },
  {
      &quot;id&quot;: 128,
      &quot;formParamSetupId&quot;: 8903,
      &quot;formParamSetup&quot;: {
          &quot;id&quot;: 8903,
          &quot;referIndex&quot;: &quot;2.8&quot;,
          &quot;formParam&quot;: {
              &quot;id&quot;: 49,
              &quot;description&quot;: &quot;Verifica massima bava ammessa&quot;,
              &quot;lastUpdate&quot;: &quot;2020-08-24T08:52:05.9991429&quot;
          },
          &quot;paramExtraValue&quot;: &quot;nel gancio max 0.3 mm&quot;,
          &quot;dimensionalSurvey&quot;: null
      },
      &quot;formCheckListTimer&quot;: null,
      &quot;formCheckListQualityCheck&quot;: null,
      &quot;insertDate&quot;: &quot;2021-11-08T12:23:18.05241&quot;
  },
  {
      &quot;id&quot;: 129,
      &quot;formParamSetupId&quot;: 8902,
      &quot;formParamSetup&quot;: {
          &quot;id&quot;: 8902,
          &quot;referIndex&quot;: &quot;2.7&quot;,
          &quot;formParam&quot;: {
              &quot;id&quot;: 39,
              &quot;description&quot;: &quot;Verifica presenza&quot;,
              &quot;lastUpdate&quot;: &quot;2020-08-24T08:52:05.7915265&quot;
          },
          &quot;paramExtraValue&quot;: &quot;numero cavità stampo, numero cavità contatti e numero di vendita 52772&quot;,
          &quot;dimensionalSurvey&quot;: null
      },
      &quot;formCheckListTimer&quot;: null,
      &quot;formCheckListQualityCheck&quot;: null,
      &quot;insertDate&quot;: &quot;2021-11-08T12:23:18.0548928&quot;
  },
  {
      &quot;id&quot;: 130,
      &quot;formParamSetupId&quot;: 8904,
      &quot;formParamSetup&quot;: {
          &quot;id&quot;: 8904,
          &quot;referIndex&quot;: &quot;2.9&quot;,
          &quot;formParam&quot;: {
              &quot;id&quot;: 78,
              &quot;description&quot;: &quot;Etichette identificazione&quot;,
              &quot;lastUpdate&quot;: &quot;2020-08-24T08:52:06.6031977&quot;
          },
          &quot;paramExtraValue&quot;: null,
          &quot;dimensionalSurvey&quot;: null
      },
      &quot;formCheckListTimer&quot;: null,
      &quot;formCheckListQualityCheck&quot;: null,
      &quot;insertDate&quot;: &quot;2021-11-08T12:23:18.0574036&quot;
  },
  {
      &quot;id&quot;: 131,
      &quot;formParamSetupId&quot;: 8905,
      &quot;formParamSetup&quot;: {
          &quot;id&quot;: 8905,
          &quot;referIndex&quot;: &quot;2.10&quot;,
          &quot;formParam&quot;: {
              &quot;id&quot;: 79,
              &quot;description&quot;: &quot;Corretta quantità nelle scatole&quot;,
              &quot;lastUpdate&quot;: &quot;2020-08-24T08:52:06.6229642&quot;
          },
          &quot;paramExtraValue&quot;: null,
          &quot;dimensionalSurvey&quot;: null
      },
      &quot;formCheckListTimer&quot;: null,
      &quot;formCheckListQualityCheck&quot;: null,
      &quot;insertDate&quot;: &quot;2021-11-08T12:23:18.0597732&quot;
  },
  {
      &quot;id&quot;: 132,
      &quot;formParamSetupId&quot;: 5684,
      &quot;formParamSetup&quot;: {
          &quot;id&quot;: 5684,
          &quot;referIndex&quot;: &quot;4.1&quot;,
          &quot;formParam&quot;: {
              &quot;id&quot;: 86,
              &quot;description&quot;: &quot;Verifica presenza ultimo reclamo esposto&quot;,
              &quot;lastUpdate&quot;: &quot;2020-08-31T11:27:00&quot;
          },
          &quot;paramExtraValue&quot;: null,
          &quot;dimensionalSurvey&quot;: null
      },
      &quot;formCheckListTimer&quot;: null,
      &quot;formCheckListQualityCheck&quot;: null,
      &quot;insertDate&quot;: &quot;2021-11-08T12:23:18.0636418&quot;
  },
  {
      &quot;id&quot;: 133,
      &quot;formParamSetupId&quot;: 5685,
      &quot;formParamSetup&quot;: {
          &quot;id&quot;: 5685,
          &quot;referIndex&quot;: &quot;4.2&quot;,
          &quot;formParam&quot;: {
              &quot;id&quot;: 87,
              &quot;description&quot;: &quot;Verifica corretto funzionamento della bilancia&quot;,
              &quot;lastUpdate&quot;: &quot;2020-08-31T11:27:00&quot;
          },
          &quot;paramExtraValue&quot;: null,
          &quot;dimensionalSurvey&quot;: null
      },
      &quot;formCheckListTimer&quot;: null,
      &quot;formCheckListQualityCheck&quot;: null,
      &quot;insertDate&quot;: &quot;2021-11-08T12:23:18.0662109&quot;
  },
  {
      &quot;id&quot;: 134,
      &quot;formParamSetupId&quot;: 5686,
      &quot;formParamSetup&quot;: {
          &quot;id&quot;: 5686,
          &quot;referIndex&quot;: &quot;4.3&quot;,
          &quot;formParam&quot;: {
              &quot;id&quot;: 88,
              &quot;description&quot;: &quot;Verifica Termoregolatore&quot;,
              &quot;lastUpdate&quot;: &quot;2020-08-31T11:27:00&quot;
          },
          &quot;paramExtraValue&quot;: null,
          &quot;dimensionalSurvey&quot;: null
      },
      &quot;formCheckListTimer&quot;: null,
      &quot;formCheckListQualityCheck&quot;: null,
      &quot;insertDate&quot;: &quot;2021-11-08T12:23:18.0684877&quot;
  },
  {
      &quot;id&quot;: 135,
      &quot;formParamSetupId&quot;: 5687,
      &quot;formParamSetup&quot;: {
          &quot;id&quot;: 5687,
          &quot;referIndex&quot;: &quot;4.4&quot;,
          &quot;formParam&quot;: {
              &quot;id&quot;: 89,
              &quot;description&quot;: &quot;Verifica Metal Detector&quot;,
              &quot;lastUpdate&quot;: &quot;2020-08-31T11:27:00&quot;
          },
          &quot;paramExtraValue&quot;: null,
          &quot;dimensionalSurvey&quot;: null
      },
      &quot;formCheckListTimer&quot;: null,
      &quot;formCheckListQualityCheck&quot;: null,
      &quot;insertDate&quot;: &quot;2021-11-08T12:23:18.0707119&quot;
  }]
  </code></pre>
  <p>But still having issues with it.
  I think the json response is also well formatted.</p>