I've got a Spring-MVC controller using STOMP over websockets. Everything works fine apart from the String received in my STOMP JavaScript client upon subscription has been escaped, presumably by Spring.
All the examples I can find on the web and in official documentation uses POJOs for the return types and then uses Jackson JSON conversion auto-magically - I do not want this as the JSON I return is entirely dynamic - how do I switch this nonsense off so I can just return a plain string!?
@Controller
public class FooController {
@SubscribeMapping("/foo")
public String getUser() {
String json = customJsonConversion();
return json;
}
JSON received looks is in this form "{\"x\":1}" if output of customJsonConversion is {"x":1}