# serializeSegmentedTrieJson

> **serializeSegmentedTrieJson**<`V`>(`trie`): [`SerializedSegmentedTrie`](/reference/knotkit/trie/wire/interfaces/serializedsegmentedtrie/)<`V`>

Defined in: [packages/trie/src/serialization/json.ts:52](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/trie/src/serialization/json.ts#L52)

Capture the kind and every entry of a segmented trie as a [SerializedSegmentedTrie](/reference/knotkit/trie/wire/interfaces/serializedsegmentedtrie/). O(k) time and space for k stored segments.

The value is a snapshot: later mutations of the source structure cannot change it. Two tries that hold the same entries in the same iteration order serialize identically, regardless of the operation history that built them, because the tree shape and the pruning it experienced are not observable.

## Type Parameters

### V

`V`

## Parameters

### trie

[`SegmentedTrie`](/reference/knotkit/trie/interfaces/segmentedtrie/)<`V`>

## Returns

[`SerializedSegmentedTrie`](/reference/knotkit/trie/wire/interfaces/serializedsegmentedtrie/)<`V`>
