diff --git a/docs/uts/buildin-object-api/json.md b/docs/uts/buildin-object-api/json.md index de668209c4da39ced0810c4c81080492a8ce8d57..5d6f43798cb23a287dd96d8d8f77e68953515d91 100644 --- a/docs/uts/buildin-object-api/json.md +++ b/docs/uts/buildin-object-api/json.md @@ -13,7 +13,7 @@ JSON.parse() 方法用来解析 JSON 字符串,构造由字符串描述的对 ```ts const json = `{"result":true, "count":42}`; -const obj = JSON.parse(json); +const obj = JSON.parse(json) as UTSJSONObject; console.log(obj["count"]); // expected output: 42