classdropDefault extends Annotation with StaticAnnotation
If the value of the annotated field .equals() the default value at runtime,
then the macro-generated From will omit both the key and value from the serialized blob.
Example
caseclass FooDefault(
@dropDefault i: Int = 10,
@dropDefault s: String = "lol"
)
write(FooDefault(i = 11, s = "lol")) ==>"""{"i":11}"""
write(FooDefault(i = 10, s = "lol")) ==>"""{}"""
write(FooDefault()) ==>"""{}"""
If the value of the annotated field .equals() the default value at runtime, then the macro-generated From will omit both the key and value from the serialized blob.
Example