Logcat error
07-29 12:57:57.920: E//DefaultRequestRunner.java:153(3697): 12:57:57.931 Thread-8869 An exception occurred during request network execution :Could not read JSON: Can not deserialize instance of java.lang.String out of START_OBJECT token
and this is my code in using robospice
RestTemplate restTemplate = new RestTemplate();
// Add the Jackson and String message converters
restTemplate.getMessageConverters().add(new MappingJackson2HttpMessageConverter());
restTemplate.getMessageConverters().add(new StringHttpMessageConverter());
// Make the HTTP POST request, marshaling the request to JSON, and the response to a
String response = restTemplate.postForObject(url, message, String.class);
return response;
Note: this same code is working fine some of the json output, some different kind of json, I'm getting this error, I tried to find out the json structure where exactly but what I feel both are same, so I get confused, at the same time I shout the reason of this error
0 comments:
Post a Comment