title: Can not deserialize instance of java.lang.String out of START_OBJECT using Spring Rest Template
body: <p>I am using the Rest Template to invoke a third party Restful API. but I am getting the "Can not serialize instance of java.lang.String out of START_OBJECT" Below is the code:</p>
  
  <pre><code>xml file:
  
  &lt;!-- RESTful interaction --&gt;
  &lt;bean id="jsonConverter" class="org.springframework.http.converter.json.MappingJacksonHttpMessageConverter"&gt;
      &lt;property name="supportedMediaTypes" value="application/json" /&gt;
  &lt;/bean&gt;
  &lt;bean id="restTemplate" class="org.springframework.web.client.RestTemplate"&gt;
      &lt;property name="messageConverters"&gt;
          &lt;list&gt;
              &lt;ref bean="jsonConverter" /&gt;
          &lt;/list&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  
  **java code:**
  
  response= restTemplate.getForObject(url, String.class);
  </code></pre>
  
  <p>The url is valid URL in the restTemplate.getForObject() method. I verified it putting the same URL in the browser and it produces the valid JSON object.</p>
  
  <p>Below is the error I am getting:</p>
  
  <blockquote>
    <p>[5/9/13 16:25:56:352 CDT] 00000028 SystemErr     R
    org.springframework.http.converter.HttpMessageNotReadableException:
    Could not read JSON: Can not deserialize instance of java.lang.String
    out of START_OBJECT token  at [Source:
    sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@3dd83dd8;
    line: 1, column: 1]; nested exception is
    org.codehaus.jackson.map.JsonMappingException: Can not deserialize
    instance of java.lang.String out of START_OBJECT token  at [Source:
    sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@3dd83dd8;
    line: 1, column: 1]</p>
  </blockquote>
  
  <p>What am I doing Wrong?</p>