There is a C# class which has certain properties. When outputting an object of this class in a HttpResponseMessage, I know that if a property is null, we can hide that property in JSON response by annotating that property with the following
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
Is there a way to hide the same property if its a certain value? For e.g. dont show SportType property in JSON if its value is "Tennis"?