[ 
https://issues.apache.org/jira/browse/TAPESTRY-2209?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Howard M. Lewis Ship reassigned TAPESTRY-2209:
----------------------------------------------

    Assignee: Howard M. Lewis Ship

> JSONObject response contains additional {}
> ------------------------------------------
>
>                 Key: TAPESTRY-2209
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2209
>             Project: Tapestry
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: 5.0.11
>         Environment: java version "1.6.0_01"
> Linux penfold 2.6.22-14-generic #1 SMP Tue Feb 12 07:42:25 UTC 2008 i686 
> GNU/Linux
> Tapestr 5.0.11-SNAPSHOT
>            Reporter: Adriaan Joubert
>            Assignee: Howard M. Lewis Ship
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to