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
It would be really nice if the default withPrefix property in JsonPOJOBuilder could be exposed in a property file. (Same goes for some of the other properties, but this is the one I want to focus on)
That way, when I am writing my builder according to company standards, I don't have to worry about adding the annotation manually. Also consider that when using lombok, the @builder annotation, the builder methods are just variablename and not withVariablename.
I think the more configurable a project can be, the better.
The text was updated successfully, but these errors were encountered:
Jackson does not directly support any form of external configuration (either from properties or via system properties), and this is by design.
I would be open to additional module(s) for support such configurability, but I don't think it belongs in core jackson-databind. It probably would make sense to do that as part of 3.0 version as well, since that will use builder-style construction where this might plug in nicely (maybe).
Another thing to consider is that on short term you can sub-class JacksonAnnotationIntrospector and use different mechanism for exposing configuration same as if annotations were used.
Source could be external config file or such.
And finally, mix-in annotations can sometimes work as well.
cowtowncoder
changed the title
Property for JsonPOJOBuilder withPrefix
Configuring JsonPOJOBuilder "withPrefix" on external configuration file
May 24, 2020
I have no plans to implement configuration system that uses external configuration files: this sounds like something an extension project could tackle, or maybe module.
Will move to "future ideas" repo.
It would be really nice if the default
withPrefix
property in JsonPOJOBuilder could be exposed in a property file. (Same goes for some of the other properties, but this is the one I want to focus on)That way, when I am writing my builder according to company standards, I don't have to worry about adding the annotation manually. Also consider that when using lombok, the @builder annotation, the builder methods are just
variablename
and notwithVariablename
.I think the more configurable a project can be, the better.
The text was updated successfully, but these errors were encountered: