sdlSingle

Causes an array to be serialized as a plain sequence of entry tags instead of wrapping them in a separate parent tag.

@property
SDLSingleAttribute
sdlSingle
()

Examples

struct S {
	@sdlAttribute int foo;
	@sdlAttribute int bar;
}

struct T {
	S[] arr1;
	@sdlSingle S[] arr2;
}

assert(
	serializeSDLang(T([S(1, 2), S(3, 4)], [S(5, 6), S(7, 8)])).toSDLDocument() ==
	"arr1 {\n" ~
	"\tentry foo=1 bar=2\n" ~
	"\tentry foo=3 bar=4\n" ~
	"}\n" ~
	"arr2 foo=5 bar=6\n" ~
	"arr2 foo=7 bar=8\n"
);

Meta