# toWirePivotModel (@salmonui/data/json)

> The toWirePivotModel function of @salmonui/data/json: The model as it travels: rejects client-only aggregators, drops formats and conditional formats, omits defaults. Throws ProtocolError with code pivot/unsupported-aggregate for a value field whose aggregate is custom or a function.

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

```ts
import { toWirePivotModel } 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: function

```ts
function toWirePivotModel(model: WirePivotModel): WirePivotModel;
```

The model as it travels: rejects client-only aggregators, drops formats and
conditional formats, omits defaults. Throws `ProtocolError` with code
`pivot/unsupported-aggregate` for a value field whose aggregate is
`custom` or a function.
