Skip to content

Commit 125b206

Browse files
committed
Web:解决array示例格式化json错乱;优化代码
1 parent 84e3c21 commit 125b206

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

APIJSON-JavaScript/access_error.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<script >
1010
var json = {
1111
"Privacy":{
12-
"id":38710,
12+
"id":38710
1313
}
1414
};
1515

APIJSON-JavaScript/delete.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414

1515
//方式二,适用于删除多个同类型对象
16-
// deleteArray("Moment", [10000, 10001, 10002]);
16+
// deleteArray("Moment", [10000, 10001, 10002]);
1717

1818

1919
// //方式三,通用方式,适用于删除单个对象

APIJSON-JavaScript/get/array.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
*/
3232
function callBack() {
3333
var rp = JSON.parse(rq.responseText);
34-
alert("Response:\n" + format(rp));
34+
alert("Response:\n" + format(JSON.stringify(rp)));
3535

3636
var arr = rp == null ? null : rp["User[]"]; //取出数组User[]
3737

APIJSON-JavaScript/get/complex.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"count":3,
2828
"Comment":{
2929
"momentId@":"[]/Moment/id" //已通过encode函数自动转义 encodeURIComponent("[]/Moment/id")
30-
},
30+
}
3131
}
3232
}
3333
};

0 commit comments

Comments
 (0)