generate pretty json when saving