Skip to content
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 mechanism for setting default ContextAttributes for ObjectMapper #3001

Closed
cowtowncoder opened this issue Dec 23, 2020 · 1 comment
Closed
Milestone

Comments

@cowtowncoder
Copy link
Member

Currently (2.12) the only way to specify default ContextAttributes for ObjectMapper is to directly modify DeserializationConfig/SerializationConfig. But it'd seem better to allow doing this via MapperBuilder, adding something like

defaultAttributes(ContextAttributes)

method (and simple tests).

@cowtowncoder cowtowncoder changed the title Add mechanism for setting default ContextAttributes for ObjectMapper (via MapperBuilder) Add mechanism for setting default ContextAttributes for ObjectMapper Feb 2, 2021
@cowtowncoder
Copy link
Member Author

Addition using MapperBuilder.defaultAttributes(ContextAttributes) (for 2.13 and 3.0); 2.13 also has direct ObjectMapper.setDefaultAttributes(...) since it is required for builder to work.

@cowtowncoder cowtowncoder added this to the 2.13.0 milestone Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant