Saving and loading from JSON file.