title: Deserializing inner class when using GSON and Retrofit
body: <p>My api response is like:</p>
  
  <pre><code> "stories": [
      {
        "id": 3509,
        "title": "Greece financial crises ",
        "isBreaking": "0",
        "updated": "1435719565",
        "readers": "0",
  
        "feed": [
          {
            "feed_id": "2",
            "title": "cnn",
            "logo_url": "http:\\/\\/cnn.com\\/images\\/logo.gif",
            "site_url": "http:\\/\\/cnn.com\\/news.php\\/"
          }
        ]
      },
  </code></pre>
  
  <p>For that, i have created two classes. The first one is <code>StoryAbstact</code> class which has field <code>feed</code> of type <code>Feeds</code> class</p>
  
  <pre><code> public class StoryAbstract {
  
          private long id;
          private String title;
          private int isBreaking;
          private Long updated;
          private long readers;
          private String date;
          private String image;
          private List&lt;Feeds&gt; feed;
          ..
          // getters and getters
          public List&lt;Feeds&gt; getFeed() {
              return feed;
          }
  
          public void setFeed(List&lt;Feeds&gt; feed) {
              this.feed = feed;
          }
  
          ....
          ....
  </code></pre>
  
  <p>The second class is <code>Feeds</code> like:</p>
  
  <pre><code>public class Feeds {
      private int feed_id;
      private String title;
      private String logo_url;
      private String site_url;
      ..
          // getters &amp; setters
      public int getFeed_id() {
          return feed_id;
      }
  
      public void setFeed_id(int feed_id) {
          this.feed_id = feed_id;
      }
  
      public String getTitle() {
          return title;
      }
  
      public void setTitle(String title) {
          this.title = title;
      }
  
      public String getLogo_url() {
          return logo_url;
      }
  
      public void setLogo_url(String logo_url) {
          this.logo_url = logo_url;
      }
  
      public String getSite_url() {
          return site_url;
      }
  
      public void setSite_url(String site_url) {
          this.site_url = site_url;
      }
  
      //setters
  }
  </code></pre>
  
  <p>I want to show information from both classes (<code>StoryAbstract</code> and <code>Feeds</code>) in my recyclerView adapter and for that, i am able to get the data deserialized from first class but only null from the second class.</p>
  
  <p>i think this is due to that, the second class is not deserialized and i am not able to solve it. i am using Retrofit 1.9.0.</p>
  
  <p>Any help please...</p>
  
  <h1>Edit</h1>
  
  <p>I have followed the answers below but none of them have solved my problem.
  i believe i have some thing wrong when i call the Feed class in my adapter.
  my adapter code is like:</p>
  
  <pre><code> private static class ViewHolderItem extends RecyclerView.ViewHolder implements View.OnClickListener {
  
          private final TextView txtTitle;
          private final ImageView imageIcon;
          private final TextView feedName;
          private Context context;
          private StoryAbstract story;
          private TextView timeStamp;
          private Feeds feed;
  
          public ViewHolderItem(View itemView, Context context) {
              super(itemView);
  
              this.context = context;
              txtTitle = (TextView) itemView.findViewById(R.id.list_item_title);
              imageIcon = (ImageView) itemView.findViewById(R.id.list_item_image);
              feedName = (TextView) itemView.findViewById(R.id.feedName);
                     itemView.setOnClickListener(this);
          }
  
          public void bindStory(StoryAbstract story) {
              this.story = story;
              txtTitle.setText(story.getTitle());
              feedName.setText(feed.getTitle());
              String imageUrl = story.getImageUrl();
              if (!TextUtils.isEmpty(imageUrl)) {
                  Ion.with(imageIcon)
                          .placeholder(R.drawable.loading)
                          .error(R.drawable.loading)
                          .load(imageUrl);
                  imageIcon.setVisibility(View.VISIBLE);
              } else {
                  imageIcon.setVisibility(View.GONE);
              }
          }
  </code></pre>
  
  <p><code>feedName.setText(feed.getTitle());</code> returns null</p>