Why store a version in a save file?
{ "version": 2, "gold": 120 }
- To migrate old saves
- To detect a corrupt file
- To compress it further
- To sort the save slots
The loader can upgrade an older layout instead of rejecting the player's progress.
Play Game Dev ▸