Consider this case
data class Taco(@property:Json(name = "propertyName") @param:Json(name = "paramName") val seasoning: String)
How should code gen (and possible reflection, need to check if it's also missing handling for this) handle this? Or should it just throw it back to the author as programmer error?
Similar issue exists with json qualifier annotations with parameters if they are duplicated with different parameter values.
The parameter annotation shouldn't be honored because it's not a member that participates in serialization. It's just the parameter you use to create an instance. The properties are what is being serialized and so only their annotations should be honored.
Most helpful comment
The parameter annotation shouldn't be honored because it's not a member that participates in serialization. It's just the parameter you use to create an instance. The properties are what is being serialized and so only their annotations should be honored.