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

# encode(to:)

Serializes a captured room to the specified encoder.

## Declaration

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

## Parameters

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

## See Also

### Serializing a captured room

- [CapturedRoom.AttributesCodableRepresentation](roomplan/capturedroom/attributescodablerepresentation.md)
