Toml Block Array
Modify the encoding of corresponding array-like property, either to force array of tables to be encoded as block array, or to change how many items will be encoded per line (will override TomlConfig).
Note: If the corresponding property is marked TomlInline, this annotation will not take effect.
data class NullablePairList<F, S>(
@TomlBlockArray(2)
val list: List<Pair<F, S>?>
)
NullablePairList(listOf(Pair("key", 1), null, Pair("key", 3), Pair("key", 4)))Content copied to clipboard
will produce:
list = [
{ first = "key", second = 1 }, null,
{ first = "key", second = 3 }, { first = "key", second = 4 }
]Content copied to clipboard