You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Annotations given to someCrazyFieldName will not work for ChildClass if written as follows.
// from #151openclassSuperClass(@JsonProperty("annotationName") valsomeCrazyFieldName:String)
classChildClass(s:String) : SuperClass(s)
The reason for this behavior is that the constructor of the superclass is not parsed by Jackson (note that in the sample, the annotation is given to the constructor arguments).
About Workaround
In such cases, the annotation should be given to the getter or field.
openclassSuperClass(@get:JsonProperty("annotationName") valsomeCrazyFieldName:String)
/* or */openclassSuperClass(@field:JsonProperty("annotationName") valsomeCrazyFieldName:String)
About the planned implementation of this feature
There are many difficulties in implementing this feature, and it also causes performance degradation.
Therefore, we do not plan to implement this feature.
True, jackson-databind does not support overriding of constructor annotations (as they generally make less sense than method ones which are supported), at least on Java side, and have complications (wrt different overloads).
Annotations given to
someCrazyFieldName
will not work forChildClass
if written as follows.The reason for this behavior is that the constructor of the superclass is not parsed by
Jackson
(note that in the sample, the annotation is given to the constructor arguments).About Workaround
In such cases, the annotation should be given to the getter or field.
About the planned implementation of this feature
There are many difficulties in implementing this feature, and it also causes performance degradation.
Therefore, we do not plan to implement this feature.
The details are summarized in this comment.
The text was updated successfully, but these errors were encountered: