title: POST nested json in postman formdata
body: <p>actually, I wanted to send nested JSON with an image to creating user profile image in Django, and the main issues addressed to I cant fill the nested objects </p>
  
  <p>this is my json that successfully post in raw mode : </p>
  
  <pre><code> {
  "id": 1,
  "bio": "salam manam",
  "user": {
      "username": "amirlesani",
      "first_name": "",
      "password":"somepasword"
      "last_name": "",
      "email": ""
  },
  "user_type": {
      "user_type": "br"
               }
   }
  </code></pre>
  
  <p>But when I want to fill up the form data same as that way its shown an error like this</p>
  
  <p>user_type: this field is required!</p>
  
  <p>user: this field is required!</p>
  
  <p>serlializers:</p>
  
  <pre><code> class UserProfileSerializer(serializers.HyperlinkedModelSerializer):
      user = UserSerializer()
      user_type = UserTypeSerializer()
      images = ProfileImageSerializer(source='profileimage_set', many=True, read_only=True)
  
      class Meta:
          model = UserProfile
          fields = ('id', 'bio', 'user', 'images', 'user_type')
  
      def create(self, validated_data):
          usertype = validated_data.pop('user_type')
          type = UserTypeSerializer.create(UserTypeSerializer(), validated_data=usertype)
  
          user_data = validated_data.pop('user')
          user = UserSerializer.create(UserSerializer(), validated_data=user_data)
  
          userprofile = UserProfile.objects.create(user=user, bio=validated_data.pop('bio'), user_type=type)
          images_data = self.context.get('view').request.FILES
  
          for image_data in images_data.values():
              ProfileImage.objects.create(userprofile=userprofile, image=image_data, user_type=type)
  
          userprofile.save()
          return userprofile
  </code></pre>