Skip to content

Latest commit

 

History

History
26 lines (16 loc) · 876 Bytes

tsbuffer.tsbuffer.decodejson.md

File metadata and controls

26 lines (16 loc) · 876 Bytes

Home > tsbuffer > TSBuffer > decodeJSON

TSBuffer.decodeJSON() method

从 JSON Object 解码,根据协议将 ArrayBuffer、Date、ObjectId 等类型从 JSON 中还原

Signature:

decodeJSON<T = unknown>(json: any, schemaOrId: string | TSBufferSchema, options?: DecodeOptions): DecodeOutput<T>;

Parameters

Parameter Type Description
json any JSON Object (是 JSON 对象,而非 JSON 字符串)
schemaOrId string | TSBufferSchema
options DecodeOptions (Optional)

Returns:

DecodeOutput<T>