# serializeSnapshotSetJson

> **serializeSnapshotSetJson**<`T`>(`set`): [`SerializedSnapshotSet`](/reference/knotkit/snapshot-set/wire/interfaces/serializedsnapshotset/)<`T`>

Defined in: [packages/snapshot-set/src/serialization/json.ts:71](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/snapshot-set/src/serialization/json.ts#L71)

Capture a [SnapshotSet](/reference/knotkit/snapshot-set/interfaces/snapshotset/) as a [SerializedSnapshotSet](/reference/knotkit/snapshot-set/wire/interfaces/serializedsnapshotset/). O(k + m) time and space, where k is the number of registered values and m is the total number of effective mutations recorded across their histories — a direct dump of what is already stored, no search involved.

Every registered value is captured, including ones currently absent, and every minted snapshot id is captured, so a restored structure answers `has`, `hasAt`, `values`, and `valuesAt` identically to the original — including for ids the caller already held before calling `serializeSnapshotSetJson`.

## Type Parameters

### T

`T`

## Parameters

### set

[`SnapshotSet`](/reference/knotkit/snapshot-set/interfaces/snapshotset/)<`T`>

## Returns

[`SerializedSnapshotSet`](/reference/knotkit/snapshot-set/wire/interfaces/serializedsnapshotset/)<`T`>
