# readText

URL: https://www.caprid.com/docs/reference/typescript/caprid/relay/index/functions/readtext/

```ts
function readText(object): string;
```

Defined in: [relay-sdks/ts/src/payload.ts:19](https://github.com/caprids/relay-sdks/blob/main/ts/src/payload.ts#L19)

Decode one complete object as UTF-8. Malformed UTF-8 throws a TypeError.

## Parameters

| Parameter | Type |
| ------ | ------ |
| `object` | `Pick`\<[`MoqtObject`](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/moqtobject/), `"payload"`\> |

## Returns

`string`
