django rest api: JSON parse error - No JSON object could be decoded
<p>I'm using postman to create a POST request to my django view</p>

<pre><code>@csrf_exempt
@api_view(['POST'])
def create_user(request):
    data = JSONParser().parse(request)
    serializer = CaretakerSerializer(data=data)
    if serializer.is_valid():
        serializer.save()
        return JSONResponse(serializer.data, status=201)
    return JSONResponse(serializer.errors, status=400)
</code></pre>

<p>but I get the following error:</p>

<pre><code>{
  "detail": "JSON parse error - No JSON object could be decoded"
}
</code></pre>

<p>When trying to print my request.body I get the following:</p>

<pre><code>------WebKitFormBoundaryrg1JNLvBOEfjkQAT
Content-Disposition: form-data; name="name"

Rubencito
------WebKitFormBoundaryrg1JNLvBOEfjkQAT
Content-Disposition: form-data; name="email"

rubencito@yahoo.com
------WebKitFormBoundaryrg1JNLvBOEfjkQAT--
</code></pre>

<p>This is the postman screenshot:</p>

<p><a href="https://i.stack.imgur.com/sTMGA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sTMGA.png" alt="enter image description here"></a></p>