title: Retrofit 2: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2 path $
body: <p>I am use Retrofit 2. I use test JSON on <a href="http://ip.jsontest.com/" rel="nofollow noreferrer">http://ip.jsontest.com/</a>.It is very simple JSON. Why I am take this error? </p>
  
  <p>In real project i have this ERROR too, but i think, it is because I have very big JSON. And I thy use test JSON. Need HELP))</p>
  
  <p><code>java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2 path $</code></p>
  
  <p><strong>This is JSON</strong></p>
  
  <p>{
  "ip": "54.196.188.78"
  }</p>
  
  <p><strong>My Interface</strong></p>
  
  <pre><code>public interface UmoriliApi {
      @GET(".")
      Call&lt;List&lt;Test&gt;&gt; getData();
  }
  </code></pre>
  
  <p><strong>My Test class</strong></p>
  
  <pre><code>public class Test {
      @SerializedName("ip")
      @Expose
      private String ip;
  
      public String getIp() {
          return ip;
      }
      public void setIp(String ip) {
          this.ip = ip;
      }
  }
  </code></pre>
  
  <p><strong>My API class</strong></p>
  
  <pre><code>public class App extends Application {
  
      private static UmoriliApi umoriliApi;
      private Retrofit retrofit;
  
      @Override
      public void onCreate() {
          super.onCreate();
  
          retrofit = new Retrofit.Builder()
                  .baseUrl("http://ip.jsontest.com/") 
                  .addConverterFactory(GsonConverterFactory.create()) 
                  .build();
          umoriliApi = retrofit.create(UmoriliApi.class); 
      }
  
      public static UmoriliApi getApi() {
          return umoriliApi;
      }
  }
  </code></pre>
  
  <p><strong>My MainActivity class</strong></p>
  
  <pre><code>public class MainActivity extends AppCompatActivity {
  
      private static final String TAG = "TAG";
      List&lt;Test&gt; posts;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          posts = new ArrayList&lt;&gt;();
  
          App.getApi().getData().enqueue(new Callback&lt;List&lt;Test&gt;&gt;() {
              @Override
              public void onResponse(Call&lt;List&lt;Test&gt;&gt; call, Response&lt;List&lt;Test&gt;&gt; response) {
                  posts.addAll(response.body());
                  Log.d(TAG, "onResponse: "+posts.size());
              }
  
              @Override
              public void onFailure(Call&lt;List&lt;Test&gt;&gt; call, Throwable t) {
                  Log.d(TAG, "onFailure: ");
              }
          });
      }
  }
  </code></pre>