Hi, if you use text/plain, you get a string from the Server(if you check it f.e. in firebug) that looks like a JSON-Object but Javascript handles this like a String.
So you have to use qx.util.Mime.JSON that the answer is a real JSON-Object. Tobias -----Ursprüngliche Nachricht----- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Derrell Lipman Gesendet: Dienstag, 5. Februar 2008 16:13 An: qooxdoo Development Betreff: Re: [qooxdoo-devel] JSON and mysql 2008/2/5 Wieringa Timotheus <[EMAIL PROTECTED]>: > > The "alert(content)" gives me ["blabla","bla","dved","dwq"] back. Ok, so it looks like the content you're getting back from the server should be valid, and qx.io.Json.parse() should, in theory, accept it. Would you please try two things: First, comment out the initial code in qx.io.Json.parse() that checks the text against the regular expression. See if the eval then succeeds. (Alternatively, you can temporarily replace your call to qx.io.Json.parse(content) with eval("(" + content + ")") and see if it succeeds. (Don't leave it like that, though. You're opening yourself up to possible attack by not validating the incoming data.) Assuming that worked, please try replacing that if statement at the beginning (the one with the regular expression) with this one: if (!(/^[\],:{}\s]*$/.test(text.replace(/\\./g, '@'). replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']'). replace(/(?:^|:|,)(?:\s*\[)+/g, '')))) and see if it then works. (Don't forget to switch back to calling qx.io.Json.parse() if you had switched to eval().) The regular expression I've provided here is the one currently being recommended for verifying that text to be eval()ed isn't "nasty". The problem with this new one is that it excludes 'new' object instantiation which we explicitly require for JSON-RPC (new Date()). If this regular expression solves your problem, see if you can figure out why the original regular expression thinks there is something wrong with your data. Cheers, Derrell ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel