hello everybody~
I'm sorry I can't speak english very well.
Question : when I serve json type, how to add prefix or suffix to http
response body?
please see the code and result below.
----------------------------------------------------------------
source code
----------------------------------------------------------------
public Response returnObject(Object obj) {
.....................
return
ResponseImpl.ok(obj).type("application/json").build();
}
----------------------------------------------------------------
----------------------------------------------------------------
result
----------------------------------------------------------------
{"code":"12312","name":"WT-4G120A"}
----------------------------------------------------------------
----------------------------------------------------------------
expected result
----------------------------------------------------------------
js_result({"code":"12312","name":"WT-4G120A"})
----------------------------------------------------------------
happy new year! thank you.