// Deserialize a serializeElements buffer (or a view over one) back into the columnar elements form
cytoscape.deserializeElements(input: ArrayBuffer | ArrayBufferView): ColumnarElementsDeserialize a serializeElements buffer (or a view over one) back into the columnar elements form. Numeric columns are zero-copy views into the given buffer; a misaligned view is copied once to realign.
| Name | Description |
|---|---|
input: ArrayBuffer | ArrayBufferView | a |
ColumnarElementsthe columnar form, whose numeric columns are views into the input rather than copies — so the buffer must outlive the result, and writing into either is visible through the other. Graph-level data is the exception in two ways: it is decoded from JSON rather than viewed, and cy.add() deliberately ignores it (see ColumnarElements.data)
Example
const payload = cytoscape.deserializeElements(cy.serialize());console.log(payload.nodes.count); // 3if the platform is big-endian, or the buffer is too short, truncated or of an unsupported format version