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 KnownTypesBinder uses other char than "[", "]" and "," then this works correct. It seems that Newtonsoft.Json does some post-processing with the typeName provided by the SerializationBinding and interprets the chars "," and "[", "]" in some way.
The text was updated successfully, but these errors were encountered:
You need to specify TypeNameAssemblyFormatHandling.Full so that the serializer doesn't try to strip out the full assembly name which is what it's trying to do here.
Thanks for providing the correct setting. This fixed my issue.
This might even gain a little bit performance because RemoveAssemblyDetails will not be called - as it should not when a custom SerializationBinder takes over.
Source/destination types
https://github.com/omghb/JsonSerializationBinderBug/blob/main/JsonSerializationBinderBug/SerializationBinderBugDemo.cs
Source/destination JSON
Expected behavior
Actual behavior
Steps to reproduce
I have published a sample xUnit test to reproduce this issue here:
https://github.com/omghb/JsonSerializationBinderBug
Workaround
When the
KnownTypesBinder
uses other char than "[", "]" and "," then this works correct. It seems that Newtonsoft.Json does some post-processing with the typeName provided by the SerializationBinding and interprets the chars "," and "[", "]" in some way.The text was updated successfully, but these errors were encountered: