I'm using Json.net(Newtonsoft.Json) to serialize or deserialize some class.
There is my class
[DataContract]
Public class Person
{
[DataMember]
public string ID { get; set; }
}
public class Student : Person
{
public string StudentName { get; set;}
}
Now I want to serialize student, But Looks like Json.net only serialize or deserialize DataContract
class and DataMember
property. It always ignore my StudentName
property, But I need it include in.
Is there any way to fixed this? thank you.