title: Why am I getting a null object?
body: <p>I'm trying to get JSON data from <code>https://newsapi.org/v1/articles</code> with Retrofit, but I'm new to it and it's been quite confusing so far.</p>
  
  <p>From what I can tell, I've managed to establish a successful connection. However, for some reason I haven't been able to identify yet, Retrofit doesn't map the data from the JSON strings to my <code>NewsAPI</code> class.</p>
  
  <p>I'll post the code that I'm currently using, and I'm hoping someone can help me figure this out. Thanks!</p>
  
  <p><code>Activity.java</code>:</p>
  
  <pre><code>final TextView tvTest = (TextView) findViewById(R.id.tvTest);
  String url = "https://newsapi.org";
  
  NewsAPI_Interface client = NewsAPI_Adapter.createService(NewsAPI_Interface.class);
  Call&lt;List&lt;NewsAPI&gt;&gt; call = client.getData("techcrunch", "APIkeygoeshere");
  
  call.enqueue(new Callback&lt;List&lt;NewsAPI&gt;&gt;() {
              @Override
              public void onResponse(Call&lt;List&lt;NewsAPI&gt;&gt; call, Response&lt;List&lt;NewsAPI&gt;&gt; response) {
                  if (response.body() != null) {
                      tvTest.setText(response.body().toString());
  
                      for (NewsAPI news: response.body()) {
                          System.out.println(news.source + " (" + news.status + ")");
                          tvTest.setText(news.source + " (" + news.status + ")");
                      }
                  } else {
                      tvTest.setText("It's null, " + response.errorBody().toString() + ", " + call.request().url());
                  }
              }
  
              @Override
              public void onFailure(Call&lt;List&lt;NewsAPI&gt;&gt; call, Throwable t) {
                  tvTest.setText("An error ocurred!");
              }
          });
  </code></pre>
  
  <p><code>NewsAPI.java</code>:</p>
  
  <pre><code>public class NewsAPI {
      String status;
      String source;
  
  public NewsAPI (String status, String source) {
          this.status = status;
          this.source = source;
      }
  }
  </code></pre>
  
  <p><code>NewsAPI_Interface.java</code>:</p>
  
  <pre><code>public interface NewsAPI_Interface {
      @GET("/v1/articles")
      Call&lt;List&lt;NewsAPI&gt;&gt; getData(@Query("source") String source, @Query("api_Key") String api_key);
  }
  </code></pre>
  
  <p><code>NewsAPI_Adapter.java</code>:</p>
  
  <pre><code>public class NewsAPI_Adapter {
      public static final String API_BASE_URL = "https://newsapi.org";
  
      private static OkHttpClient.Builder httpClient = new OkHttpClient.Builder();
  
      private static Retrofit.Builder builder = new Retrofit.Builder()
              .baseUrl(API_BASE_URL)
              .addConverterFactory(GsonConverterFactory.create());
  
      public static &lt;S&gt; S createService(Class&lt;S&gt; serviceClass) {
          Retrofit retrofit = builder.client(httpClient.build()).build();
          return retrofit.create(serviceClass);
      }
  }
  </code></pre>