$。每个数据()返回在Firefox上不同的结果和铬

Ive得到这种JSON的由

{ 

"media":{

"1369725029":{

"id_profil":"5738",

"photo_profil":"http:\/\/www.mupiz.com\/5738\/picture",

"phrase_feed":"a ajout\u00e9 une nouvelle chanson",

"nom_media":"La Douleur (chanson sur mon tableau)",

"nom_profil":"KRISS",

"url_profil":"kriss",

"streaming":"\r\n <div class=\"playerMedia\" onclick=\"InlinePlayer(this)\" data-url=\"http:\/\/www.mupiz.com\/mp3\/5738\/mp3_51550.mp3\" data-id=\"mp3_51550.mp3\">La Douleur (chanson sur mon tableau)<\/div>\r\n",

"url_media":"http:\/\/www.mupiz.com\/kriss\/la-douleur-chanson-sur-mon-tab"

},

"1369723360":{

"id_profil":"5738",

"photo_profil":"http:\/\/www.mupiz.com\/5738\/picture",

"phrase_feed":"a ajout\u00e9 une nouvelle chanson",

"nom_media":"On the Hi-Way (chanson)",

"nom_profil":"KRISS",

"url_profil":"kriss",

"streaming":"\r\n <div class=\"playerMedia\" onclick=\"InlinePlayer(this)\" data-url=\"http:\/\/www.mupiz.com\/mp3\/5738\/mp3_54344.mp3\" data-id=\"mp3_54344.mp3\">On the Hi-Way (chanson)<\/div>\r\n",

"url_media":"http:\/\/www.mupiz.com\/kriss\/on-the-hi-way-chanson1"

},

"1368389617":{

"id_profil":"32236",

"photo_profil":"http:\/\/www.mupiz.com\/32236\/picture",

"phrase_feed":"a ajout\u00e9 une nouvelle vid\u00e9o",

"nom_media":"P!nk - Just Give Me A Reason ft Nate Ruess (Real Chanty Cover) ",

"nom_profil":"Real Chanty",

"url_profil":"RealChanty",

"streaming":"<iframe width=\"270px\" height=\"200px\" src=\"http:\/\/www.youtube.com\/embed\/xiDzmc59fjg\" frameborder=\"0\" allowfullscreen><\/iframe>",

"url_media":"http:\/\/www.mupiz.com\/RealChanty\/video\/p-nk-just-give-me-a-reason-ft-nate-ruess-real-chanty-cover"

},

"1368384065":{

"id_profil":"1388",

"photo_profil":"http:\/\/www.mupiz.com\/1388\/picture",

"phrase_feed":"a ajout\u00e9 une nouvelle chanson",

"nom_media":"On the Hi-Way (chanson)",

"nom_profil":"Fred.Baz1-Compositeur-Bassiste-Guitariste",

"url_profil":"fred-bazin",

"streaming":"\r\n <div class=\"playerMedia\" onclick=\"InlinePlayer(this)\" data-url=\"http:\/\/www.mupiz.com\/mp3\/1388\/mp3_49786.mp3\" data-id=\"mp3_49786.mp3\">On the Hi-Way (chanson)<\/div>\r\n",

"url_media":"http:\/\/www.mupiz.com\/fred-bazin\/on-the-hi-way-chanson"

}

}

}

铬送得到“正确”为了FF没有,

任何想法?

回答:

我不认为你可以依赖于JSON对象内属性的排序--JSON可以以任何顺序返回。

从JSON规范在http://www.json.org/

An object is an unordered set of name/value pairs 

可能重复? JSON order mixed up

回答:

不,因为JS没有维护订单,所以对于属性的定制没有必要。一般认为是因为这些是关键值对,顺序不需要保持。另一方面,对象数组可以并且将维持顺序,因为它被索引绑定并且可迭代。这是怎样一个对象数组的样子:正确

[ 

{ "name" : "test", "age" : 10 }, //index 0

{ "name" : "test1" ,"age": 15 } //index 1

]

以上是 $。每个数据()返回在Firefox上不同的结果和铬 的全部内容, 来源链接: utcz.com/qa/263036.html

回到顶部