Inform the config filler that this sequence is to be read as a mapping
On some occasions, one might want to read a mapping as an array.
One reason to do so may be to provide a better experience to the user,
e.g. having to type:
The former would require to be expressed as an associative arrays.
However, one major drawback of associative arrays is that they can't have
an initializer, which makes them cumbersome to use in the context of the
config filler. To remediate this issue, one may use @Key("name")
on a field (here, interfaces) so that the mapping is flattened
to an array. If name is null, the key will be discarded.
Inform the config filler that this sequence is to be read as a mapping
On some occasions, one might want to read a mapping as an array. One reason to do so may be to provide a better experience to the user, e.g. having to type:
Instead of the slightly more verbose:
The former would require to be expressed as an associative arrays. However, one major drawback of associative arrays is that they can't have an initializer, which makes them cumbersome to use in the context of the config filler. To remediate this issue, one may use @Key("name") on a field (here, interfaces) so that the mapping is flattened to an array. If name is null, the key will be discarded.