TomlComment

@SerialInfo
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class TomlComment(val text: String)(source)

Add comments to corresponding property.

data class IntData(
@TomlComment("""
An integer,
but is decoded into Long originally
""")
val int: Int
)
IntData(10086)

will produce:

# An integer,
# but is decoded into Long originally
int = 10086

Properties

Link copied to clipboard

the comment texts.