1

おそらく本当に単純なことですが、私はそれを理解することはできません。次のコマンドがあります。それはjson配列を返します。

var zz = fm.request({
                    data : {cmd : 'url', target : hash},
            preventFail : true,
            options: {async: true},


        })


        alert (zz.cmd); // or alert (zz.url);//  tried every combination I can think of. Must be something wrong with the way I am calling it.

これにより、次のjsonが出力されます。

{"url":"https:\/\/test.com\/s\/tx74i3t9cet49xi\/vlc-record-2009-10-03-06h26m55s-http___79.125.42.98_film4_ls_auth%3D2e2fd32b2d221ce406085c03ec01722f-.ts","debug":{"connector":"php","phpver":"5.3.15","time":1.9966609477997,"memory":"4852Kb \/ 3932Kb \/ 128M","upload":"","volumes":[{"id":"l1_","name":"localfilesystem","mimeDetect":"finfo","imgLib":"gd"},{"id":"d2_","name":"dropbox","mimeDetect":"finfo","imgLib":"gd"}],"mountErrors":[]}}

URLに警告するだけです。私は未定義になっている、またはまったく何もありません。

投稿リクエスト。

cmd         url
target    d2_LzY4NV9DbGllbnRCdWdzXzIueGxzeA
Source   cmd=url&target=d2_LzY4NV9DbGllbnRCdWdzXzIueGxzeA
4

2 に答える 2

0

そのはずalert(zz.data.cmd)

于 2012-08-28T13:05:54.240 に答える
0

オプション ハッシュの後の余分なカンマ。JSON データ/ハッシュは www.jsonlint.org で検証でき、さらに @Ray が投稿したものも検証できます。

{
"data": {
    "cmd": "url",
    "target": "hash"
},
"preventFail": true,
"options": {
    "async": true
}
}
于 2012-08-28T13:24:21.783 に答える