// Export a plain-object snapshot containing elements, stylesheet, viewport, interaction settings and graph-level data
cy.json(flat?: boolean): Record<string, unknown>Export a plain-object snapshot containing elements, stylesheet, viewport, interaction settings and graph-level data.
This method is export-only: json(object) is not supported. Use patch() to reconcile incoming element data, clone() to copy a live instance, or serialize() to save a compact element payload for later loading.
| Name | Description |
|---|---|
flat: boolean? | when true, elements export as one flat array instead of |
Record<string, unknown>the exported graph
if given anything but a boolean — the guard that catches an attempted json( obj) import