Does JSON.NET support the IgnoreDataMember attribute or do I have to use JsonIgnore instead? Is this something that will be support in future?
In addition I’ve found that JSON.NET is serializing properties that are get only – is this intended behaviour? Is it something we can switch off at serializer level?
Answering my own question, but thought it may be helpful to others…
We ended up implementing this using a custom
IContractResolver. We want the functionality of theDefaultContractResolverso we derive from that then tweakCreatePropertyto ignore things we don’t really care to serialise. E.g.