我正在尝试在C#上检索JSON对象这里是我的JavasSciprt帖子但是我无法在代码隐藏上进行处理,谢谢!
$.ajax({
type: "POST",
url: "facebook/addfriends.aspx",
data: { "data": response.data },
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (msg) {
location = '/facebook/login?URL=' + ReturnURL + '&UID=' + response.authResponse.userID + '&TK=' + response.authResponse.accessToken + '';
}
});
Run Code Online (Sandbox Code Playgroud)
我试图检索如下数据:
Request.Form["data"]
Request["data"]
Run Code Online (Sandbox Code Playgroud) 我正在尝试将对象数组(嵌套)转换为JSON字符串.这是我的JSON输出:
[{
"Width": 570,
"SessionID": 2003404006158805,
"Price": "69,90",
"PageCount": 24,
"Pages": [{
"ID": 1,
"TemplateID": 0,
"PageType": "cover",
"TextContainers": [],
"ImageContainers": []
}, {
"ID": 2,
"TemplateID": 1001,
"PageType": "single",
"TextContainers": [],
"ImageContainers": []
}, {
"ID": 3,
"TemplateID": 0,
"PageType": "double",
"TextContainers": [],
"ImageContainers": [{
"Width": 570,
"IsBG": true,
"Brightness": 0,
"Contrast": 0,
"PosX": null,
"ScaleX": null,
"Height": 284,
"ID": -1,
"BlackWhite": 0,
"PosY": null,
"HasPhoto": false,
"ScaleY": null,
"PhotoID": null
}]
}, {
"ID": 4,
"TemplateID": 0,
"PageType": …Run Code Online (Sandbox Code Playgroud)