JsonBin class provides methods for parsing and writing binary JSON-like data.

JsonBin类提供了用于解析和写入二进制JSON数据的方法。

构造函数

方法

构造函数

方法

  • 参数

    • data: ArrayBufferLike

      The ArrayBuffer to be checked.

    返回 boolean

    True if the data is identified as JSONBin data, false otherwise.

    Checks if the given ArrayBuffer contains JSONBin data.

    检查给定的ArrayBuffer是否包含JsonBin数据。

  • 参数

    • data: ArrayBufferLike

      The ArrayBuffer to be parsed.

    • 可选createObjWithClass: Function

      An optional function to create objects with class information

    返回 any

    The parsed data as an object. If parsing fails, returns null.

    Parses the given ArrayBuffer as JSONBin data.

    将给定的ArrayBuffer解析为JsonBin数据。

  • 参数

    • o: any

      The object to be serialized.

    • 可选enableClass: boolean

      A flag indicating whether to include class information (default is false).

    返回 ArrayBuffer

    The serialized object as an ArrayBuffer.

    Serializes the given object into a binary format and returns the resulting buffer.

    将给定对象序列化为二进制格式并返回生成的缓冲区。