title: Custom rule for deserializing decimal values in JSON.NET
body: <p>I'm running into issues when I use <code>JsonConvert.DeserializeObject</code> to convert <code>JSON</code> data to a custom class whenever there's a <code>null</code> value for a property expecting a <code>decimal</code>.</p>
  
  <p>I want to implement a custom rule that is used only when I want to -- don't want a global setting. In this particular case, I want <code>null</code> values to become <code>0</code> whenever the property is of a decimal type.</p>
  
  <p>How do I accomplish this?</p>