私はQooxdooフレームワークを学んでおり、小さなDjangoWebサービスで動作させるようにしています。Django Webサービスは、次のようなJSONデータを返します。
{ "name": "Football", "description": "The most popular sport." }
次に、次のコードを使用してそのURLをクエリします。
var req = new qx.io.remote.Request(url, "GET", "application/json");
req.toggleCrossDomain();
req.addListener("completed", function(e) {
alert(e.getContent());
});
req.send();
残念ながら、コードを実行すると、予期しないトークンエラーが発生し、タイムアウトが要求されます。
Uncaught SyntaxError: Unexpected token :
Native.js:91013011 qx.io.remote.RequestQueue[246]: Timeout: transport 248
Native.js:91013011 qx.io.remote.RequestQueue[246]: 5036ms > 5000ms
Native.js:91013013 qx.io.remote.Exchange[248]: Timeout: implementation 249
JSLintはこれが有効なJSONであると報告しているので、なぜQooxdooが正しく解析しないのか疑問に思います。