How to ensure my web app has backward compatibility with importing JSON based user data?

jonathanvmv8f@lemm.ee to Programming@programming.dev – 27 points –

I am working on a small web app that stores user data locally using indexedDB which can be imported/exported by making use of JSON files. Since I plan on adding updates to the site, I want to know what best practices I should follow to make sure my app can allow importing of user data from older versions. It could be related to how I should define the properties of my user data object to make it future proof, or any library or tool I could implement that would make this migration process easier.

Do keep these points in mind:

  1. I am using NextJS to build this application and Dexie to manage indexedDB
  2. Without going into details, the user data file makes use of heavily nested objects and arrays and most likely won't fit in a cookie or even in the local storage API
  3. This web app acts as a proof of concept which must only make use of the aforementioned core technologies, regardless of whether more efficient alternatives exist or not.
16

You are viewing a single comment

HTMX is great by I don't think it's what OP needs since the input and desired output is not hypermedia in the first place.

I was replying to someone talking about GraphQL and Ruby on rails, not the OP of this post.

No but you are misunderstanding me — I’m talking about a web API for others to consume, not using GraphQL in the frontend of a website.