If you want to send ids
in the request and expect dictionary
of items in the response, then this approach might be useful.
tag = TagSerializer(many=True, read_only=True)
tag_ids = serializers.PrimaryKeyRelatedField(
queryset=Tag.objects.all(),
many=True,
write_only=True,
source="tag",
)