-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
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
STJ failing ungracefully when attempting to serialize attributes #58947
Comments
Tagging subscribers to this area: @eiriktsarpalis, @layomia Issue DetailsDiscovered while investigating #58690. The code using System;
using System.Text.Json;
JsonSerializer.Serialize(new MyAttribute());
public class MyAttribute : Attribute { } Throws the exception
Like #58690 this covers a niche use case, though we should still investigate the root cause and at least attempt to fail gracefully.
|
Moving to the .NET 8 milestone. |
Appears to have been fixed by #67618. Root cause was attempting to polymorphically serialize a |
* Add runtime detection for constructor parameters with missing names. Fix dotnet#58690. * Extend NotSupportedTypeConverter to MemberInfo types from System.Type types. Contributes to dotnet#58947.
Discovered while investigating #58690. The code
Throws the exception
Like #58690 this covers a niche use case, though we should still investigate the root cause and at least attempt to fail gracefully.
The text was updated successfully, but these errors were encountered: