This project has moved and is read-only. For the latest updates, please go here.

Any way to have Json Serializer skip nulls?

Sep 5, 2009 at 5:24 PM

Just wondering if it's possible to have the serializer skip null values when creating the json.

Here is what I have:


.SerializeObject(value, new IsoDateTimeConverter());

Sep 6, 2009 at 5:33 AM

Use the SerializeObject overload that has JsonSerializationSettings and set NullValueHandling to Ignore.