-
-
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 JsonMapper.builderWithJackson2Defaults()
#5004
Conversation
{ | ||
ObjectMapper mapper = JsonMapper.builderWithJackson2Defaults().build(); | ||
JsonFactory jsonFactory = (JsonFactory) mapper.tokenStreamFactory(); | ||
assertFalse(mapper.isEnabled(StreamReadFeature.USE_FAST_DOUBLE_PARSER)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should also not verify streaming-level setting at databind level.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
People who want max Jackson2 compatibility will want mapper and factory level Jackson2-like config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but it must be done at correct level -- streaming at streaming, databind at databind. Not with overlap.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JsonMapper.builderWithJackson2Defaults() is a high level method that creates a factory for you.
I have modified the lower level configureForJackson2 methods not to set factory level configs.
JsonMapper.builderWithJackson2Defaults()
JsonFactoryBuilder.configureForJackson2()
,JsonFactoryBuilder builderWithJackson2Defaults()
jackson-core#1411 or equivalent first