Skip to content

Latest commit

 

History

History
37 lines (21 loc) · 1.34 KB

File metadata and controls

37 lines (21 loc) · 1.34 KB
title Introduction
description Type-safe JSON migration tool with Zod schema validation
sidebar_order 1

Introduction

Welcome to the json-up documentation.

Why json-up?

When you store JSON locally, the structure inevitably changes over time. New fields get added, old ones renamed, formats evolve.

Without a migration system, you end up with scattered if statements checking for old formats, or worse, data that silently breaks. json-up gives you a structured way to handle these changes with type safety and validation.

Documentation sections

Start here. Learn what migrations are, install the library, and build your first migration step by step.

Complete reference for all functions: createMigrations(), migrate(), createMigration(), and their async counterparts createAsyncMigrations(), migrateAsync(), createAsyncMigration().

Understand the three error types (ValidationError, MigrationError, VersionError) and how to handle them in your code.

Common patterns: renaming fields, adding defaults, restructuring nested objects, transforming arrays, and more.

How to contribute, where to find us, and how to get help.