Does ServiceStack uses KnownTypeAttribute?

Hi,

I was reviewing some old code and I found a DTO that uses the KnownTypeAttribute and I would like to know if ServiceStack uses this attribute when serializing to JSON (I am not concerned about XML serialization at the moment). I did a search in ServiceStack’s Github repos and I did not find any references to it.

Thanks

No, KnownTypeAttribute is only used by .NET’s built-in serializers like XML (which ServiceStack does use for its XML Serialization). But no other Serializer I know of uses it which is a code smell that I strongly recommend avoiding.

Thanks, I’ll remove that code since I do not use XML serialization.