Because library I use works only with data classes contain params with annotations.
I think I understand. As possible example, it can be external dto which has common block of code (for example - self link for output json dtos).
Did you consider interface for this?
E.g. you can have:
interface B {
@JsonParameter("double_value")
val field1: Double
}
interface C {
@JsonParameter("int_value")
val field2: Int
}
data class A(
val override field1: Double,
val override field2: Int,
@JsonParameter("char_value")
val field3: Char
): B, C
?