title: Need to ignore NULL values when deserializing JSON
body: <p>I'm consuming some simple stock data in the form of JSON and plotting it on a chart. All works fine, except that some entries return NULL values because at that particular minute in time no trades were taken and therefore no price data is available. This creates gaps on the chart line.</p>
  
  <p>So if the "close" value is null, I want to exclude the entire block including the "minute" and "volume" from being added into the ObservableCollection, and just move on to include the next one whose values are not null. Example JSON:</p>
  
  <pre><code>{
  "minute": "10:21",  
  "close": null,      
  "volume": 0,
  },{     
  "minute": "10:22",
  "close": 47.56,
  "volume": 6,
  }       
  </code></pre>
  
  <p>I have created a jsonSettings property which I have seen people talk about and claim work, yet it is not working. The code looks like this:</p>
  
  <pre><code>var jsonSettings = new JsonSerializerSettings
          {
              NullValueHandling = NullValueHandling.Ignore,
              MissingMemberHandling = MissingMemberHandling.Ignore
          };
  
          string content = await _client.GetStringAsync(url); 
          var json_Data = JsonConvert.DeserializeObject&lt;ObservableCollection&lt;ChartData&gt;&gt;(content,jsonSettings); 
          viewModel.LineData = json_Data;
  </code></pre>
  
  <p>And here are my models:</p>
  
  <pre><code>public class ChartData
  {
      [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
      public string minute { get; set; }
  
      [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
      public double? close { get; set; }
  
      [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
      public int volume { get; set; }
  }
  
  public class ViewModel
  {
      public ObservableCollection&lt;ChartData&gt; LineData { get; set; }
  
      public ViewModel()
      {
          LineData = new ObservableCollection&lt;ChartData&gt;();
      }
  }
  </code></pre>
  
  <p>I have tried numerous similar examples posted here and there and yet the null-value entries remain within the json_Data. Any ideas how to make it work?</p>
  
  <p>Thanks!</p>