martinsumera
07/01/2020, 1:00 PMdata class Car(val engine: Engine? = null, val size: Size? = null)
data class Engine(val type: String? = null, val horsePower: Int? = null)
data class Size(val size: Int? = null)
Car(engine = Engine(horsePower = null), size = Size(size = 1000))
then I should get the following output (engine is excluded even if it is set)
car {
size {
size = 1000
}
}
Does anyone have any tip on how to achieve this?