From d60873e423f11d9d682cd41610700f7ce1e8fb3a Mon Sep 17 00:00:00 2001 From: m0_75226990 Date: Sat, 14 Sep 2024 16:53:13 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4UTSJSONObject=E9=83=A8?= =?UTF-8?q?=E5=88=86=E6=B5=8B=E8=AF=95=E4=BE=8B=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit a90c8d0c7645e5659f868b0e8d36ecfa501d7cec) --- uni_modules/uts-tests/utssdk/UTSJSONObject.uts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/uni_modules/uts-tests/utssdk/UTSJSONObject.uts b/uni_modules/uts-tests/utssdk/UTSJSONObject.uts index f97827f..1df2475 100644 --- a/uni_modules/uts-tests/utssdk/UTSJSONObject.uts +++ b/uni_modules/uts-tests/utssdk/UTSJSONObject.uts @@ -203,7 +203,7 @@ export function testUTSJSONObject() : Result { }) // #END - // #ifdef APP-ANDROID + // #TEST UTSJSONObject.convert type User = { name : string, @@ -214,13 +214,13 @@ export function testUTSJSONObject() : Result { age: 12 } // UTSJSONObject => 自定义type - let userA = JSON.parse(jsonObj.toJSONString()) + let userA = JSON.parse(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 -- GitLab