title: Make names of named tuples appear in serialized JSON responses
body: <p><strong>Situation</strong>: I have multiple Web service API calls that deliver object structures. Currently, I declare explicit types to bind those object structures together. For the sake of simplicity, here's an example:</p>
  
  <pre><code>[HttpGet]
  [ProducesResponseType(typeof(MyType), 200)]
  public MyType TestOriginal()
  {
      return new MyType { Speed: 5.0, Distance: 4 };
  }
  </code></pre>
  
  <p><strong>Improvement</strong>: I have loads of these custom classes like <code>MyType</code> and would love to use a generic container instead. I came across named tuples and can successfully use them in my controller methods like this:</p>
  
  <pre><code>[HttpGet]
  [ProducesResponseType(typeof((double speed, int distance)), 200)]
  public (double speed, int distance) Test()
  {
      return (speed: 5.0, distance: 4);
  }
  </code></pre>
  
  <p><strong>Problem</strong> I am facing is that the resolved type is based on the underlying <code>Tuple</code> which contains these meaningless properties <code>Item1</code>, <code>Item2</code> etc. Example:</p>
  
  <p><a href="https://i.stack.imgur.com/89RUb.png" rel="noreferrer"><img src="https://i.stack.imgur.com/89RUb.png" alt="enter image description here"></a></p>
  
  <p><strong>Question</strong>: Has anyone found a solution to get the names of the named tuples serialized into my JSON responses? Alternatively, has anyone found a generic solution that allows to have a single class/representation for <em>random</em> structures that can be used so that the JSON response explicitly names what it contains.</p>