Show HN: JSON-up – Like database migrations, but for JSON

When you store JSON locally - app data, config files, browser storage - the schema inevitably changes between versions.

New fields get added, old ones get renamed, formats evolve. Without a migration system, you end up with brittle ad-hoc upgrade code or broken user data.

I built json-up, a small TypeScript library that lets you define a chain of versioned migrations that transform JSON data step by step. It's type-safe, so the compiler catches mismatches between versions.

Originally, I needed this for upgrading local app data between mobile app releases for Whisper, but it works for anything where JSON schemas drift over time. Happy to hear what you think.

---

json-up: https://github.com/Nano-Collective/json-up Whisper: https://usewhisper.org

1 points mrspence 8 months ago 0 comments

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton