save and load gamestate from json