# createJsonStateStorage (@salmonui/data/storage)

> The createJsonStateStorage function of @salmonui/data/storage: State storage over the JSON protocol endpoint: { v: 1, state: { op: 'load' | 'save' | 'remove', gridId, state?, expectedVersion? } } -> { v: 1, state: DataGridState | null, version?, status?: 'saved' | 'conflict' }.

Canonical: https://salmonui.dev/docs/reference/data/storage/createJsonStateStorage

```ts
import { createJsonStateStorage } from '@salmonui/data/storage';
```

Also exported from `@salmonui/data`.

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

## Reference

Kind: function

```ts
function createJsonStateStorage(options: FetchTransportOptions): DataGridStateStorage;
```

State storage over the JSON protocol endpoint:
`{ v: 1, state: { op: 'load' | 'save' | 'remove', gridId, state?, expectedVersion? } }`
-> `{ v: 1, state: DataGridState | null, version?, status?: 'saved' | 'conflict' }`.
