Home > tsbuffer > TSBuffer > encodeJSON
编码为 JSON Object,根据协议将 JSON 不支持的格式(如 ArrayBuffer、Date、ObjectId)转换成 JSON 可传输的格式
Signature:
encodeJSON(value: any, schemaOrId: string | TSBufferSchema, options?: EncodeOptions): EncodeJsonOutput;| Parameter | Type | Description |
|---|---|---|
| value | any | |
| schemaOrId | string | TSBufferSchema | |
| options | EncodeOptions |
Returns:
EncodeJsonOutput