In our game, we have a special class that saves everything that can be changed in spine skeleton during gameplay: attachments names used in every slot where they can be changed, colors of all slots that can be recolored, names of currently used skins, currently used animation names, skeleton flipping bool, skeleton scale float, etc. And all this is applied during loading to spine skeleton.
Perhaps it's possible to just save the whole SkeletonData, no idea. But this way we don't save anything that is not needed to be saved, which I prefer more. In your example, you'd need to save the name of hairstyle attachment (it's a string), and apply it to hairstyle slot upon loading.