Skip to main content
CrystalFlow workflows are fully serializable to JSON, enabling persistent storage, version control, and sharing.

Why Serialization?

Persistence

Save workflows to files or databases

Version Control

Track changes with Git

Sharing

Share workflows across teams

Templates

Create reusable workflow templates

Serialization API

To JSON

Convert a workflow to JSON:

From JSON

Load a workflow from JSON:

JSON Format

Workflows serialize to this format:

Save to File

Node.js

Browser

Load from File

Node.js

Browser

React Integration

Save Button

Load Button

LocalStorage

Save to LocalStorage

Load from LocalStorage

Auto-Save Hook

Validation

Validate JSON before deserializing:

Version Control with Git

Initialize Repository

Commit Workflows

View Changes

Track History

Restore Previous Version

Export Formats

Pretty Print

Minified

Database Storage

SQL Database

MongoDB

Best Practices

Always validate workflows before serialization to catch errors early.
Store workflows in Git for history tracking and collaboration.
Include name, description, and version in workflow JSON.
Never serialize sensitive data - use variables at runtime.
Implement auto-save to prevent data loss.

Next Steps

JSON Schema

Understanding the JSON format

Workflow API

Complete Workflow API

Version Control Guide

Git best practices (coming soon)

Migration

Version migration (coming soon)