The OpenD Programming Language

serdeIgnoreDefault

Attribute to ignore a field during deserialization when equals to its default value. Do not use it on void initialized fields or aggregates with void initialized fields, recursively.

Examples

struct S
{
    @serdeIgnoreDefault
    double d = 0; // skips field if 0 during deserialization
}


static assert(hasUDA!(S.d, serdeIgnoreDefault));

Meta