The IgnoreDefaults option will only ignore fields and properties that has reference types which defaults to null value. The option has no effect on value types like int, float, bool etc.
Example class:
public class IgnoreDefaultsClass
{
public int A { get; set; }
public float B { get; set; }
public bool C { get; set; }
}
serialize object new IgnoreDefaultsClass() will produce following Ion when IgnoreDefaults is set to true:
{
a: 0,
b: 'numeric.float32'::0e0,
c: false
}