Parsing JSON response in Retrofit
<p>I'm getting the following error when trying to parse JSON response with Retrofit:
<code>java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2 path $</code></p>

<p>This is what the JSON response looks like:</p>

<pre><code>{
    "automobi": [{
        "Dealers": {
            "Dealer": [{
                "@attributes": {
                    "Id": "12",
                    "Name": "Barons Tokai",
                    "Region": "Western Cape",
                    "Status": "active",
                    "UniqueKey": "96ec67999ed613174efe17f697dc4695"
                }
            }, {
                "@attributes": {
                    "Id": "13",
                    "Name": "Barons Pietermaritzburg",
                    "Region": "KwaZulu-Natal",
                    "Status": "active",
                    "UniqueKey": "0f0637a035a9bc98ac67aa30ffc1367e"
                }
            }, {
                "@attributes": {
                    "Id": "36",
                    "Name": "Barons Bellville",
                    "Region": "Western Cape",
                    "Status": "active",
                    "UniqueKey": "9ec8f24fdee47f14ce56e9a3fc2689a4"
                }
            }, {
                "@attributes": {
                    "Id": "37",
                    "Name": "Barons Bruma",
                    "Region": "Gauteng",
                    "Status": "active",
                    "UniqueKey": "de7ac02f51463d94cb11947c1bf5589c"
                }
            }, {
                "@attributes": {
                    "Id": "38",
                    "Name": "Barons Culemborg",
                    "Region": "Western Cape",
                    "Status": "active",
                    "UniqueKey": "de2d98530d1ac95218c2eb5d25d847b2"
                }
            }, {
                "@attributes": {
                    "Id": "39",
                    "Name": "Barons N1 City",
                    "Region": "Western Cape",
                    "Status": "active",
                    "UniqueKey": "a055a9a6fa1c9a43cced2335ce6eefcb"
                }
            }, {
                "@attributes": {
                    "Id": "40",
                    "Name": "Barons Durban",
                    "Region": "KwaZulu-Natal",
                    "Status": "active",
                    "UniqueKey": "8e49cb3d88b54d144c6728a450b2f491"
                }
            }, {
                "@attributes": {
                    "Id": "41",
                    "Name": "Barons Woodmead",
                    "Region": "Gauteng",
                    "Status": "active",
                    "UniqueKey": "097722a842f43f0c59cfac14694b8443"
                }
            }]
        }
    }]
}
</code></pre>

<p>This is my Dealer class:</p>

<pre><code>public class Dealer {
    @SerializedName("Id")
    String mId;

    @SerializedName("Name")
    String mName;

    @SerializedName("Region")
    String mRegion;

    @SerializedName("UniqueKey")
    String mUniqueKey;

    public String getId() {
        return mId;
    }

    public void setId(String id) {
        this.mId = id;
    }

    public String getName() {
        return mName;
    }

    public void setName(String name) {
        this.mName = name;
    }

    public String getRegion() {
        return mRegion;
    }

    public void setRegion(String region) {
        this.mRegion = region;
    }

    public String getUniqueKey() {
        return mUniqueKey;
    }

    public void setUniqueKey(String uniqueKey) {
        this.mUniqueKey = uniqueKey;
    }
}
</code></pre>

<p>This is the Retrofit call:</p>

<pre><code>@FormUrlEncoded
@POST("get_dealer_list.php")
Call&lt;List&lt;Dealer&gt;&gt; getDealers(@Field("listname") String listName, @Field("outputformat") String outputFormat);
</code></pre>

<p>Any ideas for what I'm doing wrong?</p>