You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the base class defines a Formatter through JsonCustomSerializerAttribute, the subclass may obtain the Formatter when it obtains the Formatter; but when the code runs to ResolverBase.cs Line147, an InvalidCastException will occur.
In order to solve this problem, when performing BuildFormatter, "type. GetCustomAttribute()" should not consider inheriting?
The text was updated successfully, but these errors were encountered:
This is my test code. When I try to serialize an object of type ClassB, the following error will appear: "InvalidCastException: Unable to cast object of type 'MyTest.ClassAFormatter' to type 'SpanJson.IJsonFormatter2[MyTest.ClassB" ,System.Char]`'.
"
When the base class defines a Formatter through JsonCustomSerializerAttribute, the subclass may obtain the Formatter when it obtains the Formatter; but when the code runs to ResolverBase.cs Line147, an InvalidCastException will occur.
In order to solve this problem, when performing BuildFormatter, "type. GetCustomAttribute()" should not consider inheriting?
The text was updated successfully, but these errors were encountered: