# EncodeRowsOptions (@salmonui/data/json)

> The EncodeRowsOptions interface of @salmonui/data/json.

Canonical: https://salmonui.dev/docs/reference/data/json/EncodeRowsOptions

```ts
import type { EncodeRowsOptions } from '@salmonui/data/json';
```

Also exported from `@salmonui/data`.

Entry index: https://salmonui.dev/docs/reference/data/json (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/data/json.md).

## Reference

Kind: interface

```ts
interface EncodeRowsOptions {
    readonly fields: readonly string[];
    readonly types?: readonly WireType[];
    readonly dict?: readonly string[] | 'auto';
    readonly autoDictRatio?: number;
}
```

Members (4):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `fields` | `readonly fields: readonly string[];` |  |  |
| `types` | `readonly types?: readonly WireType[];` | optional |  |
| `dict` | `readonly dict?: readonly string[] \| 'auto';` | optional | Fields to dictionary encode. `'auto'` encodes string fields whose distinct count is at most `autoDictRatio` of the rows (default 0.25). |
| `autoDictRatio` | `readonly autoDictRatio?: number;` | optional |  |
