# deserializeScalarSketchJson

> **deserializeScalarSketchJson**(`value`): [`ScalarSketch`](/reference/knotkit/scalar-sketch/type-aliases/scalarsketch/)

Defined in: [packages/scalar-sketch/src/serialization/json.ts:131](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/scalar-sketch/src/serialization/json.ts#L131)

Deserialize exact state from an untrusted logical JSON value. Records must have exactly the documented keys as own data properties. State arrays must use `Array.prototype`, have the exact expected length, and contain own, enumerable numeric data elements at every index without holes, enumerable extras, or symbol properties. Non-enumerable string metadata on an array is ignored because it cannot affect logical restoration. Accessors at logical fields or array indices are rejected through descriptors without invocation.

## Parameters

### value

`unknown`

## Returns

[`ScalarSketch`](/reference/knotkit/scalar-sketch/type-aliases/scalarsketch/)

## Throws

For malformed envelopes, unsupported scalar-sketch versions, unknown discriminants, or invalid family state.

## Throws

From `knotkit/hash` for invalid hash identities.
