diagrams-js/json-serialization

Installation
SKILL.md

This skill builds on diagrams-js/getting-started and diagrams-js/provider-nodes. Read them first for foundational concepts.

diagrams-js — JSON Serialization

Export diagrams to JSON format and import them back. Enables cloud architecture provisioning, infrastructure-as-code integration, version control, and tool interoperability. SVG output also supports round-trip serialization via embedded metadata.

Setup

import { Diagram } from "diagrams-js";
import { EC2 } from "diagrams-js/aws/compute";

const diagram = Diagram("My Architecture");
diagram.add(EC2("Server"));

// Export to JSON
const json = diagram.toJSON();
Installs
–
GitHub Stars
29
First Seen
–
diagrams-js/json-serialization — hatemhosny/diagrams-js