提交 a90c8d0c 编写于 作者: lizhongyi_'s avatar lizhongyi_

调整UTSJSONObject部分测试例代码

上级 4e4d6882
......@@ -196,7 +196,7 @@ export function testUTSJSONObject() : Result {
})
// #END
// #ifdef APP-ANDROID
// #TEST UTSJSONObject.convert
type User = {
name : string,
......@@ -207,13 +207,13 @@ export function testUTSJSONObject() : Result {
age: 12
}
// UTSJSONObject => 自定义type
let userA = JSON.parse<User>(jsonObj.toJSONString())
let userA = JSON.parse<User>(JSON.stringify(jsonObj)!)
console.log(userA!.name)
// 自定义type => UTSJSONObject
let utsJsonA = JSON.parseObject(JSON.stringify(userA))
let utsJsonA = JSON.parseObject(JSON.stringify(userA)!)
console.log(utsJsonA)
// #END
// #endif
})
})
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册