title: How can I serialize the OneToOneField to be list in Django-Rest-Framework?
body: <p>How can I serialize the OneToOneField to be list?</p>
  
  <p>I have two Model:</p>
  
  <pre><code>class SwitchesPort(models.Model):
      """
      SwitchesPort
      """
      name = models.CharField(max_length=32)
      profile = models.CharField(max_length=256)
  
  class Server(models.Model):
      ...
      switchesport = models.OneToOneField(to=SwitchesPort, related_name="server", on_delete=models.DO_NOTHING, null=True)  
  </code></pre>
  
  <p>You see, they are OneToOne relationship.</p>
  
  <p>In the SwitchesPortSerializer, I only can set the <code>physical_server</code> <code>many=False</code>:</p>
  
  <pre><code>class SwitchesPortSerializer(ModelSerializer):
      """
      SwitchesPort
      """
      server = ServerSerializer(many=False, read_only=True)
      class Meta:
         ...
  </code></pre>
  
  <p>If I set True there will reports error, because they are one to one relationship.
  The result will be like this:</p>
  
  <pre><code>[
      {
          "name": "switches_port01",
          "profile":"",
          "server": {
              "name": "server01",
              ...
          }
      },
      ...
  ]
  </code></pre>
  
  <p>But, I want to get the <code>physical_server</code> as a JSON list, not the JSON object, how can I do that in Django-Rest-Framework?</p>
  
  <p>My requirement data is like this:</p>
  
  <pre><code>[
      {
          "name": "switches_port01",
          "profile":"",
          "server": [
              {
              "name": "server01",
              ...
              }
          ]
      },
      ...
  ]
  </code></pre>
  
  <p>Although the relationship is one-to-one, I still want to get the list, not the object.<br>
  Is it feasible to get that?</p>