---
title: "encode(to:)"
framework: roomplan
role: symbol
role_heading: Instance Method
path: "roomplan/capturedroomdata/encode(to:)"
---

# encode(to:)

Serializes captured room data to the specified encoder.

## Declaration

```swift
func encode(to encoder: any Encoder) throws
```

## Parameters

- `encoder`: An object that the captured room data serializes to.

## Discussion

Discussion An app might serialize a CapturedRoomData object to defer processing to a later date or to defer processing to another device.
