Newtonsoft JSON - Way of ignoring properties without adding [JsonIgnore]

Viewed 1424

This may seem silly, but It was the only way I can phrase it.

What I am trying to do is serialise an object and its data. The object is inheriting a large BaseObject class. I don't wan't any of the information from the inherited object to appear in the Json object, however I cannot access, or change the BaseObject class.

The class is used for pretty much all objects and there are other times where I serialize Json where many of the properties are needed, so adding [JsonIgnore] to the class wouldn't make it work.

I was wondering if there was another way to do it in terms of using JsonSerializerSettings, or any other way of doing it.

Any help would be appreciated.

2 Answers
Related