I see no mention here of serial versioning or backcompat, so I will post my solution which I've been using for a bit. I probably have a lot more to learn from, specifically Java and Javascript are probably more mature than me here but here goes
https://gist.github.com/andy-d/b7878d0044a4242c0498ed6d67fd50fe