Description
When value tuples are given field names they are also included in the serializer and end up generating compile errors.
Repo
internal static class Program
{
private static void Main()
{
JsonSerializer.Serialize(new Test(default), typeof(Test), JsonContext.Default);
}
}
internal sealed record Test((string Value1, string Value2) ValueTuple);
[JsonSerializable(typeof(Test))]
internal sealed partial class JsonContext : JsonSerializerContext
{
}
Description
When value tuples are given field names they are also included in the serializer and end up generating compile errors.
Repo