Options
All
  • Public
  • Public/Protected
  • All
Menu

Class StringSerializer

Serializer for string that uses utf-8 encoding.

This is a singleton class; use instance instead of the constructor.

Hierarchy

  • StringSerializer

Implements

Index

Properties

Methods

  • deserialize(message: Uint8Array): string
  • Inverse of serialize.

    Typically, this returns a deep clone of the original value, not the same literal reference. Indeed, it is impossible to return the original reference on a different replica.

    Parameters

    • message: Uint8Array

    Returns string

  • serialize(value: string): Uint8Array
  • Returns a Uint8Array that is the serialized form of value.

    To recover the original value, use deserialize.

    Parameters

    • value: string

    Returns Uint8Array

Generated using TypeDoc