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
}

import std.traits: hasUDA;

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

Meta