I am trying to send multiple JSON data in a single POST as a list like -

```
[
 {
    "name": "data",
 },
 {
    "name": "data",
 }
]

```

but getting the following error.

```
{
"non_field_errors": [
    "Invalid data. Expected a dictionary, but got list."
]
}

```

Here are my codes -

Serializers.py

```
class my_serializer_name(serializers.ModelSerializer):
class Meta:
    model = my_model
    fields = '__all__'

def validate(self, data):
    #Performing validation
    ......
    ......

```

viewsets.py

```
class my_viewset(viewsets.ModelViewSet):
queryset = models.my_model.objects.all()
serializer_class = serializers.my_serializer
http_method_names = ['get', 'post']

def list(self, request):
    # Note the use of `get_queryset()` instead of `self.queryset`
    queryset = self.get_queryset()
    serializer = serializers.my_serializer(queryset, many=True)
    return Response(serializer.data)

```

router.py

```
router = routers.DefaultRouter()
router.register('name' , my_viewset)

```

How to solve this issue?