function FormatJSON(Str) {
try{
Str = Str.replace(/\\/g, "");
Str = Str.replace(/(^\"{1})|(\"{1}$)/g, "");
Str = Str.replace(/(^(null\(){1})|((\)){1}$)/g, "");
Str = JSON.parse(Str);
return Str;
}catch(e){
return {};
};
};
转载于:https://www.cnblogs.com/aiwoqu/p/5623412.html