C# Serialization using Newtonsoft Json DefaultValue, How to do it?
<p>Using WebAPI2, I have a model class, and I am serializing it in a response.
I want to slim the data down.  </p>

<p>I can do this by decorating the properties of model with JsonProperty attributes, and that is fine.  </p>

<pre><code> [JsonProperty(NullValueHandling = NullValueHandling.Ignore, DefaultValueHandling = DefaultValueHandling.Ignore)]
 public string AccountFee { get { return _accountFee; } set { _accountFee = value; } }
</code></pre>

<p>I have specified DefaultValueHandling to be Ignore, but I cannot get the setting of the default value correct.</p>

<p>The documentation says to use your preferred default in this property decoration...</p>

<pre><code>[DefaultValue("DEFAULTACCOUNT")]
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, DefaultValueHandling = DefaultValueHandling.Ignore)]
public string AccountFee { get { return _accountFee; } set { _accountFee = value; } }
</code></pre>

<p>But DefaultValue is not resolved.  I cannot figure out how to reference it correctly.  </p>

<p>I have included using statements for Newtonsoft.Json and Newtonsoft.Json.Serialization, but still this is not recognised?  Am I missing a namespace, or using the attribute incorrectly?</p>