Hi Derrell,

Yes sure, It is a good idea to keep the jsonp transport generic.
IMHO this is in this case best achieved by not modifying the server answer at 
all.
So whatever the server sends back to the client, the client has to deal with it.
The problem is, that we are not sending pure json in jsonp, in fact we are 
sending javascript that will be processed by the browser using the script 
element.

In my opinion, because the data send back is processed by the script element 
already, no additional parsing should be done. 
The qx framework should really not take care here, it should pass the content 
without any further checking.
This would mean, in this special case, two possible server responses:

        a) someCallback({ ... mydate: new Date ...}); 
        or
        b)  someCallback({ ... mydate: "...}); 

Which would be both valid depending on the client.

The client to server sending part of the transport is quit similar, whatever 
the client sends, the server needs to deal with it.
Because Script-Transport does not allow to send anything but a query string, no 
conversion to any json is needed.
In fact Script-Transport and jsonp never uses the JSON build in object, only 
the sanitize code does... and it is wrong and useless in my opinion.

Should I file a bug? My solution was simply to remove this sanitize code in my 
qx 2.1 version.

Or do I miss something?

Kind regards
--
Sergio
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to