-
-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot use @JacksonXmlText on a constructor property #423
Comments
@raphw That does sound like a limitation. So, just do make sure I understand: adding equivalent annotations on constructor parameters (and not on fields) would not work? |
No, if I add the annotation to the field and let the constructor parameter blank, an exception is thrown. |
@raphw ah. So while you can add |
I think #306 might be related or maybe same? Problem, under the hood, is that "XmlText" is internally denoted as logical name of "", which unfortunately conflicts with 'missing name' option.... |
Added a failing test along with #306; will close this as dup since I think it it the same underlying issue. Will close this issue, mark 306 as "most-wanted", hoping to address in 2.13 (or if lucky and doable in patch. 2.12.x). |
Unfortunately, it is not possible to use
@JacksonXmlText
on a constructor what can be required in combination with@JacksonXmlProperty(isAttribute = true)
what prevents one from creating immutable entities.For example, the following object cannot be expressed using a constructor so that the immutable property needs to be emulated.
It would be nicer being able to use
@JacksonXmlText
on a constructor parameter.The text was updated successfully, but these errors were encountered: