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

# encode(to:)

Serializes a section to the specified encoder.

## Declaration

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

## Parameters

- `encoder`: An object that the section serializes to.
