Serializes map