I'd like to use RestTemplate to obtain response from server and process that response in my Android app, but server answers with prefix (or variable) in json body, so response looks similar to this:
response={"foo":"bar"}
Is it possible to omit that "response=" part som simple way, or do I need to reimplement MappingJacksonHttpMessageConverter class?
Thanks in advance
Edit: It works now, following code is based on newest SpringAndroid (1.0.0 RELEASE). RestTEplate(true) constructor adds required convertors and request.toMap() builds a MultiValueMap, which is only body type FormHttpMessageConverter accepts.
HttpHeaders requestHeaders = new HttpHeaders();
requestHeaders.setContentType(new MediaType("application", "x-www-form-urlencoded"));
RestTemplate restTemplate = new RestTemplate(true);
restTemplate.setRequestFactory(new HttpComponentsClientHttpRequestFactory());
final String url = "http://www.dummy.org/herp/getDerp";
String result = restTemplate.postForObject(url, request.toMap(), String.class);
Now I have string on output, from which I can extract JSON and parse that.