-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Labels
area-System.Text.JsonuntriagedNew issue has not been triaged by the area ownerNew issue has not been triaged by the area owner
Description
Description
Records contains a property EqualityContract of type Type. This leads to the generator generating serializers for many of the reflection related types as for example Type, ConstructorInfo, MethodInfo, Assembly, Module, etc.
Also it would be nice if there was a way to prevent generating metadata for non-public members.
Repo
internal static class Program
{
private static void Main()
{
JsonSerializer.Serialize(new Test(), typeof(Test), JsonContext.Default);
}
}
internal sealed record Test;
[JsonSerializable(typeof(Test))]
internal sealed partial class JsonContext : JsonSerializerContext
{
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-System.Text.JsonuntriagedNew issue has not been triaged by the area ownerNew issue has not been triaged by the area owner