Details
Description
If an event handler returns a JSONObject the response received on the client contains an additional pair of brackets.
An example:
Object onUpdate() {
....
JSONObject json = new JSONObject();
json.put("fcId", fcId);
return json;
}
This works fine, but on the client side I get:
onComplete : function(transport) {
var response = transport.responseText;
// if (response.length>2 && response.endsWith("{}"))
// response = response.substring(0,response.length-2);
var reply = response.evalJSON(true);
....
}
The responseText contains
{"fcId":36178}{}
Thanks,
Adriaan