fn

parseJsonSlice

Read a fragment written by serializeSlice. Anything that is not the expected shape yields null so the caller falls back to HTML; whatever passes goes through the schema funnel like every other document.

Signature

ts
export function parseJsonSlice(json: string, registry: Registry): Slice | null{ ... }

Parameters

ParameterTypeDescription
jsonstring—
registryRegistry—

Returns

Slice | null