Retrieving JSON data via HTTP GET using Spring Android Framework
<p>I am using spring android framework for retrieving json data via Http GET. I am getting following exception for the same :</p>

<p><strong>- Could not read JSON: Can not deserialize instance of com.springandroidjsondemo.beans.LoginBean[] out of START_OBJECT token</strong></p>

<p><strong>The bean (LoginBean) is Following</strong>  </p>

<pre><code>    package com.springandroidjsondemo.beans;

public class LoginBean {



    private String status;

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }
}
</code></pre>

<p>The android code is following : </p>

<pre><code>  HttpHeaders requestHeaders = new HttpHeaders();
requestHeaders.setAccept(Collections.singletonList(new MediaType("application", "json")));

HttpEntity&lt;?&gt; requestEntity = new HttpEntity&lt;Object&gt;(requestHeaders);
// Create a new RestTemplate instance
RestTemplate restTemplate = new RestTemplate();
// Add the Jackson message converters
restTemplate.getMessageConverters().add(new MappingJackson2HttpMessageConverter());

// Make the HTTP GET request, marshaling the response from JSON to an array of Events
ResponseEntity&lt;LoginBean[]&gt; responseEntity = restTemplate.exchange(url, HttpMethod.GET, requestEntity,LoginBean[].class); // getting exception here

LoginBean[] loginBean = responseEntity.getBody();
String status = loginBean[0].getStatus();
</code></pre>

<p>The json response from the server is following : </p>

<pre><code>{"emp-data":[{"status":"true"}]}
</code></pre>

<p>I am not sure if any annotations are required for Jackson Marshalling</p>

<p>Please suggest the solution</p>

<p>Thanks!</p>
