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

Use static factory method to obtain configured object mapper #28

Open
nicoweidner opened this issue Oct 11, 2022 · 0 comments
Open

Use static factory method to obtain configured object mapper #28

nicoweidner opened this issue Oct 11, 2022 · 0 comments

Comments

@nicoweidner
Copy link
Collaborator

nicoweidner commented Oct 11, 2022

In particular, we should make sure we don't create another object mapper every time we need one. ObjectMapper instances are supposedly comparatively expansive to create, and if we need to configure it, it would be better to have that configuration extracted.

See https://stackoverflow.com/questions/3907929/should-i-declare-jacksons-objectmapper-as-a-static-field for some suggestions regarding best practices (one global static ObjectMapper may not be the best solution either)

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