serialize Hash to string