getFieldName

Retrieves the name to use for the given field, for use in serialisation.

Rules: The rules for how the name is retrieved are a bit _convoluted_ so they're documented here.

For non-structs and non-array types: The return value of F.stringof is used.

For struct types: If the struct has an @Name UDA, then that is used. If not, the name of the return value of F.stringof is used.

For array types: If UseBase is set to UseBase.yes, then the return value of getFieldName!(ElementType!F) is used. If not, the return value of F.stringof is used.

For when F is an alias to a struct's field: The rule for the field's data type will be used, but with one change, the F.stringof value will instead return the name of the field, instead of the type.

static
string
getFieldName
()

Meta