-
-
Notifications
You must be signed in to change notification settings - Fork 142
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
Draft: Config support #521
Conversation
In general, builder-style configuration is being added to most Jackson modules so that might make sense here too, even if providing full |
@cowtowncoder my preference is still to add a jackson-databind DeserializationFeature and to uptake it in jackson-module-scala. This is just an alternative approach if we decide to keep the solution entirely in jackson-module-scala. The typesafe config is a commonly used way to configure scala libs and helps to avoid adding new APIs for setting config. |
@pjfanning I know typesafe config is widely used it's just that my experience suggests that usually such libraries/frameworks work better for main level applications/services/clients and can be less optimal (when doing automatic classpath scanning etc) for embedded components, which is a common use case for Jackson. But that is just a suggestion; if you think configuration as specified makes sense that is fine. Ditto wrt Jackson features. |
@cowtowncoder this config solution is not a solution I like but adding the current jackson-module-scala code was written in a way that makes configuring it using a Module Builder very hard without breaking binary compatibility. See https://github.com/FasterXML/jackson-module-scala/blob/master/src/main/scala/com/fasterxml/jackson/module/scala/DefaultScalaModule.scala and the way the submodules are traits, meaning I can't pass stateful class instances into them. A Module Builder would be a nice feature for jackson-module-scala v3 but I think it would be easy in v2. And so far, we have just a small number of v2 users asking for 1 config option. My preferred option for jackson v2 is FasterXML/jackson-databind#3181 or a variant of it - that would would allow me to get the config from the existing jackson-databind classes. |
@pjfanning Ok I don't have any big problems with another feature to add and it is a fair point that there's just this one request for now. |
Using a MapperFeature instead |
No description provided.