Details
-
New Feature
-
Resolution: Unresolved
-
Major - P3
-
None
-
None
-
None
-
C#
Description
The driver supports BsonIgnoreIfNull and BsonIgnoreIfDefault which of course simply skip serializing properties based on their value.
For Collection properties (List, hashset, dictionary, etc.) it would be great to have a [BsonIgnoreIfEmpty] property that would skip serialization on both null or if the collection was empty.