title: Unable to update JSON field. Shows "JSON parse error - Expecting property name enclosed in double quotes"
body: <p>I am new to Django Rest Framework. I am currently making an API, which will GET the favourite TV shows, and create or update the existing list if more TV shows are made favourite. All of these have a unique account_id. I have to send such a JSON response.</p>
  
  <pre><code>{
    "account_id": "15",
    "shows": [
      {
        "show_id": "19"
      },
      {
        "show_id": "86"
      }
    ]
  }
  </code></pre>
  
  <p>But when i try to PUT such a JSON response,</p>
  
  <pre><code>{
      "account_id": 15,
      "shows": [
      {
          "show_id": "9"
      },
      {
          "show_id": "86"
      }
      ]
  }
  </code></pre>
  
  <p>I get the error, </p>
  
  <pre><code>{
    "detail": "JSON parse error - Expecting property name enclosed in double quotes: line 2 column 5 (char 6)"
  }
  </code></pre>
  
  <p>My models.py is:</p>
  
  <pre><code>from django.db import models
  
  
  class Account(models.Model):
      account_id = models.CharField(max_length=500)
  
  
  class Show(models.Model):
      show_id = models.CharField(max_length=500)
      user_id = models.ForeignKey(Account, related_name='shows')
  </code></pre>
  
  <p>My views.py is:</p>
  
  <pre><code>from .models import Show, Account
  from showapp.serializers import ShowSerializer, AccountSerializer
  from rest_framework.views import APIView
  from rest_framework.response import Response
  from rest_framework import status
  from rest_framework.parsers import JSONParser
  from rest_framework.decorators import api_view
  
  
  class UserList(APIView):
  
      parser_classes = (JSONParser,)
  
      def get(self, request, format=None):
          users = Account.objects.all()
          serializer = AccountSerializer(users, many=True)
          return Response(serializer.data)
  
      def post(self, request, format=None):
          serializer = AccountSerializer(data=request.data)
          if serializer.is_valid():
              serializer.save()
              return Response(serializer.data, status=status.HTTP_201_CREATED)
          return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
  
      def delete(self, request, pk, format=None):
          user = self.get_object(pk)
          user.delete()
          return Response(status=status.HTTP_204_NO_CONTENT)
  
  @api_view(['GET', 'PUT'])
  def user_detail(request, account_id):
  
      try:
          user = Account.objects.get(account_id=account_id)
      except Account.DoesNotExist:
          return Response(status=status.HTTP_404_NOT_FOUND)
  
      if request.method == 'GET':
          serializer = AccountSerializer(user)
          return Response(serializer.data)
  
      elif request.method == 'PUT':
          serializer = AccountSerializer(user, data=request.data)
          if serializer.is_valid():
              serializer.save()
              return Response(serializer.data)
          return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
  </code></pre>
  
  <p>My serializers.py is:</p>
  
  <pre><code>class ShowSerializer(serializers.ModelSerializer):
  
      class Meta:
          model = Show
          fields = ('show_id',)
  
  
  class AccountSerializer(serializers.ModelSerializer):
  
      shows = ShowSerializer(many=True)
  
      class Meta:
          model = Account
          fields = ('account_id', 'shows')
  </code></pre>
  
  <p>Please Help me out. </p>