Problem AJAX(ing) JSON object on Mac Firefox version (3.6.12)

后端 未结 2 1150
长发绾君心
长发绾君心 2021-01-19 12:41

Let\'s say I want to call some server method and pass it the following JSON object:

var t = { \"test\": 0};

I\'m using jQuery library $.aja

2条回答
  •  轮回少年
    2021-01-19 13:22

    I've end up modifying GetInputStream() method to replace "%Pr" with closing bracket using regex:

     public string GetInputStream()
     {
        string inputContent;
        using (var sr = new System.IO.StreamReader(Request.InputStream))
           inputContent = sr.ReadToEnd();
    
        inputContent = System.Text.RegularExpressions.Regex.Replace(inputContent, "%Pr$", "}");
    
        return Server.UrlDecode(inputContent.Split('=')[1]);
    }
    

    I know it's not solving cause of the problem but at least I'm buying some time to come up with solution :-(

提交回复
热议问题