title: How to pass json array using get method in retrofit android
body: <p>I am new to retrofit,and not having much idea how to pass this json using retrofit and show in my app.Below is my json, MainActivity and model class.But know it is throwing an exception "Except begin_object but found begin_array".Please help me.</p>
  
  <pre><code>[
      {
          "userId": 1,
          "id": 1,
          "title": "sunt",
          "body": "sdfdsf"
        },
        {
          "userId": 1,
          "id": 2,
          "title": "qui est esse",
          "body": "jhmjk"
        }]
  </code></pre>
  
  <p>MainActivity.java</p>
  
  <pre><code>Retrofit retrofit = new Retrofit.Builder()
                  .baseUrl(BASE_URL)
                  .addConverterFactory(GsonConverterFactory.create())
                  .build();
          ApiInterface apiService = retrofit.create(ApiInterface.class);
          // ApiInterface apiService = ApiClient.getClient().create(ApiInterface.class);
          Call&lt;ModelClass&gt; call = apiService.getLogin();
          // Call&lt;LoginResponse&gt; call = apiService.loginWithCredentials(new LoginRequest(email_enter, md5pass));
          call.enqueue(new Callback&lt;ModelClass&gt;() {
              @Override
              public void onResponse(Call&lt;ModelClass&gt; call, Response&lt;ModelClass&gt; response) {
                  Log.i("REGISTRATION ---&gt;", "Registered" + response);
              }
  
              @Override
              public void onFailure(Call&lt;ModelClass&gt; call, Throwable t) {
                  Log.i("REGISTRATION ---&gt;", "Throwable" + t.toString());
                  // Intent i = new Intent(MainActivity.this,SecondActivity.class);
                  // startActivity(i);
              }
          });
      }
  </code></pre>
  
  <p>ModelClass.java</p>
  
  <pre><code>public class ModelClass {
      class Model{
          public List&lt;ObjectModel&gt; getObjectmodel() {
              return objectmodel;
          }
  
          public void setObjectmodel(List&lt;ObjectModel&gt; objectmodel) {
              this.objectmodel = objectmodel;
          }
  
          List&lt;ObjectModel&gt; objectmodel;
      }
  
      class ObjectModel{
          String userId;
          String id;
  
          public String getTitle() {
              return title;
          }
  
          public void setTitle(String title) {
              this.title = title;
          }
  
          public String getUserId() {
              return userId;
          }
  
          public void setUserId(String userId) {
              this.userId = userId;
          }
  
          public String getId() {
              return id;
          }
  
          public void setId(String id) {
              this.id = id;
          }
  
          public String getBody() {
              return body;
          }
  
          public void setBody(String body) {
              this.body = body;
          }
  
          String title;
          String body;
      }
  }
  </code></pre>