I'm using JSON.NET 6.0.1. When I use the SerializeObject
method to serialize an object of my derived class, it serializes properties from base class only. Here is the code snippet:
string v = JsonConvert.SerializeObject(
service,
Formatting.Indented,
new JsonSerializerSettings()
{
TypeNameHandling = TypeNameHandling.All
});
base class:
[DataContract]
public abstract partial class DataEntity : IDataEntity, INotifyPropertyChanging, INotifyPropertyChanged
{
...
}
derived class:
[Table(Name = "dbo.mytable")]
public sealed class mytable : DataEntity
{
...
}
Am I missing something?