• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

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

JavaScript 来源:Anthony 4次浏览

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


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)