I am writing a rest api.All things are set and woking fine. My controller :
@RequestMapping(value = "/getDetails", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
@ResponseBody
public String getDetails(@RequestBody String jsonInput) {
LOGGER.info("<------------------------ from Date :" + jsonInput );
System.out.println("resp ="+apiService.getDetails(jsonInput));
return apiService.getDetails(jsonInput);
}
When I sysout the response on console it will print normal string like -
[{"name": "abc","vendor": "abc df"}]
But I get the respnse with extra slash. All double quote is replaced by \".
"[{\"name\":\"abc\",\"vendor\":\"abc df\"}]"
Please help !. Thanks in advance.