Add a way to generate a save-state JSON spec