Aytek,
The following code works for me
                var req = new qx.io.remote.Request("searchForBooks", "GET",
"application/json");
                req.setParameter("session-key",
this.app.getUserData('session-key'));
                req.addEventListener("completed", function(e) {
                    response = e.getData().getContent();
                    if (response.status == "success") {
                       var data = response.value;
                    }

the data returned from the call looks something like this

           {"status": "success", "value": "whatever the value is"}

and I can access the data via response.status and response.value

The only difference from yours that I can see is that I am sending in an
"application/json" mime type.

I am using Cherrypy as my server to return the json object and the
"searchForBooks" request is a call to that server.  I would not think that
it would make any difference as long as the json is returned correctly.

Howerver, I have never used the json.info() function.  

Tom
                
   

 

Aytek Debreli wrote:
> 
> Hello,
> 
> I'm have just started using Qooxdoo and i am not pretty informed about
> Javascript and AJAX.
> What i want to do is goes like this:
> 
>                There's an xml2json converter somewhere running and it
> converts XML's and write them in a file. i  reach that file with
> 
>              var json = new
> qx.io.remote.Request("json.txt","GET",qx.util.Mime.JSON);
> 
>                 no problem there , its is Application/json object ...
> but when i do : " json.info()" it says object is null..
> 
> At the http://qooxdoo.org/documentation/0.7/remote_io#simple_example
> page in the suported types section it says : text/json is directly
> evaluated so i tried
> 
> new qx.io.remote.Request("json.txt","GET","text/json");
> 
> it gives me:
> 
> 1069852 DEBUG: qx.io.remote.Request[]: Current stack trace at
> qx.log.MLogging:printStackTrace://127.0.1.1/php2JSON/script/qx.js at
> http://127.0.1.1/php2JSON/script/qx.js:1994 at
> http://127.0.1.1/php2JSON/script/qx.js:2005 at
> qx.io.remote.Request:constructor://127.0.1.1/php2JSON/script/qx.js at
> qx.io.remote.Request:constructor
> wrapper://127.0.1.1/php2JSON/script/qx.js at javascript: with
> (__scope__.vars) { with (__scope__.api) { with (__scope__.userVars) {
> with (window) {try {__scope__.callback(eval(__scope__.expr));} catch
> (exc) {__scope__.callback(exc, true);}}}}}:1 at javascript: with
> (__scope__.vars) { with (__scope__.api) { with (__scope__.userVars) {
> with (window) {try {__scope__.callback(eval(__scope__.expr));} catch
> (exc) {__scope__.callback(exc, true);}}}}}:1
> 
> What i have to do ?
> Kind Regards
> Aytek Debreli
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> 
> 

-- 
View this message in context: 
http://www.nabble.com/JSON-tf4826887.html#a13821154
Sent from the qooxdoo-devel mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to