This library serializes your struct as usual, then performs a hash on the string and a magic number you've provided.
When you load the save from the disk, the hash is checked before the object is accepted.
Pick a unique number for your project, but
NEVER CHANGE IT! If you do, all old saves will be invalid.
Q: Are my saves actually safe from tampering?
A: Haha, no. This library prevents the most basic tampering where you literally just edit values in the json.
To bypass it, someone would have to open your game code and find the magic number you picked, then do annoying hash calculations themselves.
Sample project:
https://nixx.is-fantabulo.us/antitamper.zip