diff --git a/docs/uts/buildin-object-api/utsjsonobject.md b/docs/uts/buildin-object-api/utsjsonobject.md index 96160a3a7d218d4bde8f53c36eb04c20d6f56060..ea8f7b2e46881d7ea579fafbe3e39109a9d942bd 100644 --- a/docs/uts/buildin-object-api/utsjsonobject.md +++ b/docs/uts/buildin-object-api/utsjsonobject.md @@ -214,6 +214,29 @@ console.log(genericArray) ``` +### parse(): T | null + + + + + + + + + +```ts +type A = { + x:number, + y:string, +} +let rootObj = JSON.parseObject('{"x":111,"y":"aaa","t":{"name":"zhangsan"}}') +let a = rootObj!.parse() +// UTSJSONObject +console.log(rootObj) +// A +console.log(a) +``` + ### toMap(): Map @@ -234,15 +257,7 @@ person.toMap().forEach((value, key) => { -### parse(): T | null - - - - - - - ## 注意事项