We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Happens for source generator based serialization as well (tested only with .NET 8).
using System.Text.Json; using System.Text.Json.Serialization; JsonSerializer.Serialize(Console.OpenStandardOutput(), new B()); abstract class A { [JsonPropertyName("x")] public abstract int I { get; } } class B : A { public override int I => 10; }
{"x":10}
{"I":10,"x":10}
No response
Using the JsonPropertyNameAttribute on the overriding member.
JsonPropertyNameAttribute
.NET 8 and 9
The text was updated successfully, but these errors were encountered:
Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis See info in area-owners.md if you want to be subscribed.
Sorry, something went wrong.
Duplicate of #92780. See #92780 (comment) for possible workarounds.
No branches or pull requests
Description
Happens for source generator based serialization as well (tested only with .NET 8).
Reproduction Steps
Expected behavior
Actual behavior
Regression?
No response
Known Workarounds
Using the
JsonPropertyNameAttribute
on the overriding member.Configuration
.NET 8 and 9
Other information
No response
The text was updated successfully, but these errors were encountered: