|
|
|
Show HN: JSON-up – Like database migrations, but for JSON
(github.com)
|
|
1 points
by mrspence
113 days ago
|
|
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 |
|