vibe.d beta banner
get vibe.d
0.7.30

Function optional

Attribute marking a field as optional during deserialization.

Prototype

OptionalAttribute!Policy optional(alias Policy)() @property;

Example

struct Test {
	// does not need to be present during deserialization
	@optional int screenSize = 100;
}
block ddox.authorsblock ddox.copyrightblock ddox.license
Authors
Copyright
License