jquery returns a JSON array under Firefox normal to Chrome will lose 2 key values corresponding to the value of ... Why...

Source: Internet
Author: User
{"Errcode": 1, "data": {"name": {"103_0": "11111", "id": "103", "vkey": "103_0"}, "key": {"11111": "103_0"}, "file": {"": null}, "url": {"": null}}}----"The JSON that is taken in chrome

JSON that is taken from Firefox
{"Errcode": 1, "data": {"name": {"104_293": "\u5b66\u4e60\u5b66\u4e60\u5b66\u4e60\u4e0b", "id": "104", "Vkey": "104_293 "}," key ": {" \u5b66\u4e60\u5b66\u4e60\u5b66\u4e60\u4e0b ":" 104_293 "}," file ": {" 293 ":" Award-46696.jpg "}," url ": {" 293 ":" Http:\/\/hr.ryanren.dev.aifang.com\/upload\/train\/award\/award-46696.jpg "}}}

Jquery:
function Add_award (award_name,file_id) {
Jquery.ajax ({
Url:award,
Data: {
' Name ': Award_name,
' Type ': ' Add ',
' file_id ': file_id,
' prof_id ': pro_id,
},
Type: ' Post ',
Async:false,
DataType: ' JSON ',
Success:function (MyData) {
Console.log (MyData);
var str = '' +award_name+ '' +mydata.data.file[file_id]+ ' ";
$ ("#info_award"). Append (str);
$ ("#pro_award"). Val (');
$ ("#upload_icon"). Val (');
},
Error:function () {
Alert ("Error, please refresh the page, re-operate!");
}
});
}


Reply to discussion (solution)

The two JSON you gave is not the same. How can the
know what's missing?

The two JSON you gave is not the same. How can the
know what's missing? I've found out what's wrong with the source of the problem ... Thank you

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.