NullValueHandling not working as expected for arrays

Aug 31, 2012 at 3:16 PM
Edited Aug 31, 2012 at 3:17 PM

I have a POCO with an array member that may or may not be null. I want that array to be ignored when emitting JSON. I've tried using JsonProperty on the property and using JsonSerializerSettings when I call SerializeObject, but I still get something like the following:


   "DisplayName":"Metrics Over Time For Channel",


I'm using JSON.NET 4.5 r8. Am I misunderstanding how NullValueHandling.Ignore is supposed to work?