I have an object which is marked as [Serializable]
and it's properties are marked with [XmlAttribute]
and [XmlIgnore]
.It's serialized for our web-site use, and it works well.
Now I need to serialize the same object for a different use (web service), in json format.
I know I can easily serialize objects with the [DataContract]
and [DataMember]
attributes, but I can't use both - [Serializable]
and [DataContract]
.
What are my options to serialize the object?
Which is simpler?
Thanks a lot.