API Reference
describeToJson()
Render a D39 describe snapshot as deterministic JSON text.
Import
import { describeToJson } from "@graphrefly/ts/graph";
Signature
function describeToJson(
snapshot: DescribeSnapshot,
opts: DescribeToJsonOptions = {},
): string
Parameters
| Parameter | Type | Description |
|---|---|---|
snapshot | DescribeSnapshot | snapshot value used by the helper. |
opts | DescribeToJsonOptions | Options that configure the helper. |
Returns
A string value.
Example
import { describeToJson } from "@graphrefly/ts/graph";
Source
packages/ts/src/graph/render.ts