diff --git a/frameworks/ets/ets/@ohos.app.ability.Want.ets b/frameworks/ets/ets/@ohos.app.ability.Want.ets index 0eb0cec5513d0e12bab15aaace527dff798be831..379e634eee9f1e97021c9b1c964aa5ae214c26ce 100644 --- a/frameworks/ets/ets/@ohos.app.ability.Want.ets +++ b/frameworks/ets/ets/@ohos.app.ability.Want.ets @@ -55,28 +55,28 @@ class RecordWriter { private writeValueType(obj: Object): boolean { if (obj instanceof Boolean) { - this.buffer.append(JSON.stringify(obj.unboxed())); + this.buffer.append(JSON.stringify(obj.toBoolean())); return true; } else if (obj instanceof Byte) { - this.buffer.append(JSON.stringify(obj.unboxed())); + this.buffer.append(JSON.stringify(obj.toByte())); return true; } else if (obj instanceof Char) { - this.buffer.append(JSON.stringify(obj.unboxed())); + this.buffer.append(JSON.stringify(obj.toChar())); return true; } else if (obj instanceof Short) { - this.buffer.append(JSON.stringify(obj.unboxed())); + this.buffer.append(JSON.stringify(obj.toShort())); return true; } else if (obj instanceof Int) { - this.buffer.append(JSON.stringify(obj.unboxed())); + this.buffer.append(JSON.stringify(obj.toInt())); return true; } else if (obj instanceof Long) { - this.buffer.append(JSON.stringify(obj.unboxed())); + this.buffer.append(JSON.stringify(obj.toLong())); return true; } else if (obj instanceof Float) { - this.buffer.append(JSON.stringify(obj.unboxed())); + this.buffer.append(JSON.stringify(obj.toFloat())); return true; } else if (obj instanceof Double) { - this.buffer.append(JSON.stringify(obj.unboxed())); + this.buffer.append(JSON.stringify(obj.toDouble())); return true; } else if (obj instanceof BigInt) { this.buffer.append(JSON.stringify(obj)); @@ -186,7 +186,7 @@ export class RecordSerializeTool { } private static jsonValue2Object(value: JSONValue): string | number | boolean | null | - Array | Record { + Array | Record { if (value instanceof JSONString) { return value.value; } else if (value instanceof JSONNumber) {