JSON转GET请求参数
sstr = {"a":"11","b":"12",}
function json_to_get(sstr ){
sstr = sstr.replace(/\t/g,"");
sstr = sstr.replace(/\"/g,"").replace("{","").replace("}","").
sstr = sstr.replace(",","&").replace(":","=");
sstr = sstr.replace(/\"/g,"").replace(/{/g,"").replace(/}/g,"")
sstr= sstr.replace(/,/g,"&").replace(/:/g,"=");
}
GET转JSON请求参数:
function get_to_json(sstr){
sstr = sstr.replace(/&/g,'","').replace(/=/g,'":"');
sstr= '{"'+sstr+'"}';
}