savegame system Sockets

I’m trying to set up my savegame system, I can’t figure out a way to save objects that are currently attached to the player sockets. Is there a way to just save the sockets themselves, or to save their contents?