C# 10 - implementing ValueTuple Serialization in System.Text.Json - Properties Not Being Serialized
I'm not sure how to approach I'm getting frustrated with I'm working with an scenario with serializing a `ValueTuple` using `System.Text.Json` in C# 10... I have a model that includes a `ValueTuple` as one of its properties, but when I attempt to serialize it, the properties of the tuple are not included in the output JSON. Hereโs a simplified version of my code: ```csharp public class MyModel { public (int, string) MyTuple { get; set; } } var model = new MyModel { MyTuple = (1, "Test") }; var options = new JsonSerializerOptions { WriteIndented = true }; var json = JsonSerializer.Serialize(model, options); Console.WriteLine(json); ``` When I run this code, the output is: ```json { "MyTuple": null } ``` Iโve tried changing the tuple to a class instead, and that works fine. The serialization works correctly if I define `MyTuple` as a custom class: ```csharp public class MyTuple { public int Item1 { get; set; } public string Item2 { get; set; } } ``` However, I want to keep using `ValueTuple` for simplicity. I also checked the `System.Text.Json` documentation, but I couldnโt find any mention of how to handle `ValueTuple`. Is there a specific setting I need to enable to properly serialize `ValueTuple` properties, or is there a workaround for this scenario? Any insights would be appreciated! I'm developing on Windows 11 with C#. My development environment is Windows 11.