Function decodeObject

  • Decodes an RSTaggedData object to a JS object. If the data does not contain a UTF-8 encoded JSON payload with the provided tag, the function returns null

    Type Parameters

    • T

    Parameters

    • tag: string

      the expected tag

    • data: RSTaggedData

      message containing a UTF-8 encoded serialized JSON object

    Returns T | null