title: Retrofit2 cant access to arrays in POJO
body: <p>I want to pass data from JSON array to display it in RecyclerView but in logcat there is "Items = 0". Any solution?</p>
  
  <blockquote>
    <p>D/RestauransActivity: response = {"controller":"RestaurantController","info":"Restaurants found!","restaurants":[],"status":true}</p>
    
    <p>D/RestauransActivity: Items = 0</p>
  </blockquote>
  
  <pre><code>call.enqueue(new Callback&lt;RestaurantsListResponse&gt;() {
          @Override
          public void onResponse(Call&lt;RestaurantsListResponse&gt; call, Response&lt;RestaurantsListResponse&gt; response)
          {
              if(response.isSuccessful())
              {
                  data = new ArrayList&lt;&gt;();
                  RestaurantsListResponse restaurants = response.body();
                  Log.d("RestauransActivity", "response = " + new Gson().toJson(restaurants));
                  data = restaurants.getRestaurants();
                  Log.d("RestauransActivity", "Items = " + data.size());
  
                  RecyclerView recyclerView = (RecyclerView)findViewById(R.id.my_recycler_view);
                  adapter = new MyRecyclerViewAdapter(data);
                  RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(getApplicationContext());
                  recyclerView.setLayoutManager(layoutManager);
                  recyclerView.setItemAnimator(new DefaultItemAnimator());
                  recyclerView.setHasFixedSize(true);
                  recyclerView.setAdapter(adapter);
              }
  </code></pre>
  
  <hr>
  
  <pre><code>    public class RestaurantsListResponse
      {
      //...
  
      @SerializedName("restaurants")
      @Expose
      private List&lt;Restaurant&gt; restaurants = null;
  
      /...
  
      public List&lt;Restaurant&gt; getRestaurants()
      {
          return restaurants;
      }
  
      public void setRestaurants(List&lt;Restaurant&gt; restaurants)
      {
          this.restaurants = restaurants;
      }
  }
  </code></pre>
  
  <hr>
  
  <pre><code>public class Restaurant
  {
     //... fields, some setters and getters
  }
  </code></pre>