第一步:把對象轉JSON字符格式javascript
var jsonStringify = JSON.stringify({})
第二步:POST提交java
$.post("/api/notify_url.aspx", jsonStringify, function (res) { }, "json");
第三步:.NET後臺接收數據json
protected void Page_Load(object sender, EventArgs e) { Response.ContentType = "application/x-www-form-urlencoded"; StreamReader reader = new StreamReader(Request.InputStream); string stream = reader.ReadToEnd(); notifyjson json = new JavaScriptSerializer().Deserialize<notifyjson>(stream); }