Can JavaScriptSerializer exclude properties with null/default values?
FYI, if you’d like to go with the easier solution, here’s what I used to accomplish this using a JavaScriptConverter implementation with the JavaScriptSerializer: private class NullPropertiesConverter: JavaScriptConverter { public override object Deserialize(IDictionary<string, object> dictionary, Type type, JavaScriptSerializer serializer) { throw new NotImplementedException(); } public override IDictionary<string, object> Serialize(object obj, JavaScriptSerializer serializer) { var jsonExample …