Type alias SerializedType

SerializedType: undefined | string | boolean | SerializedType[]

Serialized values can be of the following types:

  • undefined
  • string
  • boolean
  • SerializedType[]

When they are a string, they are prefixed with a type identifier and a colon, e.g. S:Hello, World!.

These prefixes exist:

  • S: string
  • I: integer
  • F: float
  • B: bytes
  • ID: ID
  • H: hologram

When they are a list, they are an array with the first element being a type identifier, e.g. ['L', 'S:Hello', 'S:World'].

These prefixes exist:

  • L: list
  • T: tuple

When they are a map, they are an array with the first element being the map identifier M, e.g. ['M', ['name', 'S:Hello'], ['age', 'I:42']]. The following elements are key-value pairs.

This representation is used to serialize and deserialize values, and to distinguish between types that are not natively supported by JSON (e.g., ArrayBuffer, Hologram, integer, float, tuple).

Generated using TypeDoc