-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add MapperFeature.INFER_CREATOR_FROM_CONSTRUCTOR_PROPERTIES
to allow disabling use of @ConstructorProperties
as explicit @JsonCreator
equivalent
#1371
Comments
MapperFeature
to allow disabling use of @CreatorProperties
as explicit @JsonCreatore
equivalentMapperFeature
to allow disabling use of @CreatorProperties
as explicit @JsonCreator
equivalent
MapperFeature
to allow disabling use of @CreatorProperties
as explicit @JsonCreator
equivalentMapperFeature.INFER_CREATOR_FROM_CONSTRUCTOR_PROPERTIES
to allow disabling use of @CreatorProperties
as explicit @JsonCreator
equivalent
MapperFeature.INFER_CREATOR_FROM_CONSTRUCTOR_PROPERTIES
to allow disabling use of @CreatorProperties
as explicit @JsonCreator
equivalentMapperFeature.INFER_CREATOR_FROM_CONSTRUCTOR_PROPERTIES
to allow disabling use of @CreatorProperties
as explicit @JsonCreator
equivalent
@cowtowncoder can this be backported to 2.8 branch? 2.9 is not yet released, and this caveat is causing headaches with Lombok, and is not very easy to identify |
@tsabirgaliev Unfortunately it being an API addition it can not be backported. |
The issue description and release notes seem to have a typo, as the annotation is |
@electrum thank you, I will fix title. But as to JDK... wow. You are right, javadocs do confirm it was in JDK 6. Not sure how I misread that, but it was added in JDK 7 module. |
MapperFeature.INFER_CREATOR_FROM_CONSTRUCTOR_PROPERTIES
to allow disabling use of @CreatorProperties
as explicit @JsonCreator
equivalentMapperFeature.INFER_CREATOR_FROM_CONSTRUCTOR_PROPERTIES
to allow disabling use of @ConstructorProperties
as explicit @JsonCreator
equivalent
Thanks, I see you updated the tittle, but there are a couple other references in the description, too. |
One challenge with frameworks like Lombok, auto-values and Immutables is that they often automatically (or at least by default) add
JDK7JDK6@ ConstructorProperties
annotation for constructor(s). This makes sense, in general, but may be problematic for Jackson since as of 2.8 that is equivalent to specifying@JsonCreator
, which may not always be what is intended.One thing that can help resolve issues is to add a new
MapperFeature
, enabled by default, that determines whether@ ConstructorProperties
means same as explicit@JconCreator
(enabled) or not (disabled). If not, parameter names are still available as implicit names, and explicit@JsonCreator
may be used.Note that this requires #1369 as well.
The text was updated successfully, but these errors were encountered: