assertStrictJsonValue()
Validate and normalize a host value into strict canonical JSON data.
Import
Section titled “Import”import { assertStrictJsonValue } from "@graphrefly/ts/storage";Signature
Section titled “Signature”function assertStrictJsonValue( value: unknown, label = "strictJsonValue",): StrictJsonValueParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
value | unknown | Unknown value to check or decode. |
label | unknown | label value used by the helper. |
Returns
Section titled “Returns”The narrowed, validated value.
Example
Section titled “Example”import { assertStrictJsonValue } from "@graphrefly/ts/storage";Source
Section titled “Source”packages/ts/src/json/codec.ts