Make names of named tuples appear in serialized JSON responses
问题 Situation : 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: [HttpGet] [ProducesResponseType(typeof(MyType), 200)] public MyType TestOriginal() { return new MyType { Speed: 5.0, Distance: 4 }; } Improvement : I have loads of these custom classes like MyType and would love to use a generic container instead. I came across named tuples and can