ZenFG TypeScript API / snapshot / root / stringifyFrameGraphSnapshot
Function: stringifyFrameGraphSnapshot()
stringifyFrameGraphSnapshot(
snapshot,options?):string
Defined in: packages/snapshot/src/codec.ts:245
Validates and serializes a canonical Snapshot 1.2 document.
Parameters
snapshot
Producer-owned snapshot to validate before serialization.
options?
FrameGraphSnapshotStringifyOptions = {}
Formatting options. Omitted options produce compact JSON.
Returns
string
Canonical JSON text without mutating snapshot.
Remarks
The input is cloned through own data-property descriptors before validation and serialization, so getters and toJSON hooks are never invoked. Extension object/array nesting is limited by FRAME_GRAPH_SNAPSHOT_MAX_EXTENSION_DEPTH.
Throws
FrameGraphSnapshotValidationError when JSON-safety or semantic validation fails.