D
Dave Sanders
I have an object that has a [DataContract] attribute on it and several
[DataMembers]. This object inherits from another object that does NOT
have any data contract attributes, but whose properties trickle down
into the object I'm trying to serialize. This makes the serializer
give me errors telling me I need to add the DataContract to my parent
object.
Is there any way around this? Is there a way that I can tell it to
serialize my main object into JSON and just ignore those properties
that come from the parent object? I don't particularly need the
properties, and I can't add the attributes to the parent class.
Thanks
[DataMembers]. This object inherits from another object that does NOT
have any data contract attributes, but whose properties trickle down
into the object I'm trying to serialize. This makes the serializer
give me errors telling me I need to add the DataContract to my parent
object.
Is there any way around this? Is there a way that I can tell it to
serialize my main object into JSON and just ignore those properties
that come from the parent object? I don't particularly need the
properties, and I can't add the attributes to the parent class.
Thanks