Retrofit 2.0 get array of json object as a result of post request
<p>I have a response form server as : </p>

<pre><code>[
  {
    "ID": "1",
    "Title": "BIRATNAGAR",
    "BankID": "1",
    "BranchCode": "0",
    "LocationID": "71500200",
    "IsActive": "yes"
  },
  {
    "ID": "2",
    "Title": "BIRATNAGAR",
    "BankID": "1",
    "BranchCode": "0",
    "LocationID": "71500900",
    "IsActive": "yes"
  },
  {
    "ID": "3",
    "Title": "BIRATNAGAR",
    "BankID": "1",
    "BranchCode": "0",
    "LocationID": "94361117",
    "IsActive": "yes"
  }
]
</code></pre>

<p>I have retrofit api as: 
  @POST("authapp/Restserver/api/Masterdata/getBranchListByBank")
    Call> getBranchListByBank(@Query("api_key")  String id);</p>

<p>I have called it as:
 RetrofitArrayAPI service = retrofit.create(RetrofitArrayAPI.class);</p>

<pre><code>    Call&lt;List&lt;BankBranch&gt;&gt; call = service.getBranchListByBank(s);

    call.enqueue(new Callback&lt;List&lt;BankBranch&gt;&gt;() {
        @Override
        public void onResponse(Call&lt;List&lt;BankBranch&gt;&gt; call, Response&lt;List&lt;BankBranch&gt;&gt; response) {
            try {

                List&lt;BankBranch&gt; banks = response.body();

                for (int i = 0; i &lt; banks.size(); i++) {

                    String id  = banks.get(i).getTitle();
                    String name = banks.get(i).getID();
                    String marks = banks.get(i).getIsActive();
                    Log.i("ashihs", id + " " + marks + " " + name);


                }


            } catch (Exception e) {
                Log.d("onResponse", "There is an error");
                e.printStackTrace();
            }
        }

        @Override
        public void onFailure(Call&lt;List&lt;BankBranch&gt;&gt; call, Throwable t) {
            Log.d("onFailure", t.toString());
        }

    });
</code></pre>

<p>But I cannot get the list of the bank branch. I get error as : 
java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2 path $</p>

<p>Can any one help me? 
Thanks in advance.</p>