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

Jackson 3 support #2

Open
pjfanning opened this issue Jan 27, 2021 · 3 comments
Open

Jackson 3 support #2

pjfanning opened this issue Jan 27, 2021 · 3 comments

Comments

@pjfanning
Copy link
Owner

Some Work In Progress is in a 'jackson-3' branch.

@pjfanning
Copy link
Owner Author

@cowtowncoder what is the Jackson 3 equivalent of setTypeFactory? The project README examples are based around replacing an ObjectMapper's TypeFactory with one that has its cache replaced.

@cowtowncoder
Copy link

@pjfanning If we are talking about ObjectMapper, it is immutable so replacement would need to be done during building phase. Method in MapperBuilder would be typeFactory(f). Access to builder is bit hidden, but it is via getOwner() method of setup context (Module.SetupContext) accessible during setupModule() call.

I wish I had time to work on cache-configurability part(s), as this would fall under that category. Still would need to (re)configure during building but would be sort of simpler, more standard, and avoid whole-sale replacement of TypeFactory -- and because of that would be cleanly exposed via Module.SetupContext.

But for immediate future this should work; please let me know if I missed some piece.

@mof-dev-3
Copy link

It seems we could reuse a single CaffeineLookupCache for multiple ObjectMappers, even if they have different configurations, provided they share some workloads (classes/types).

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

3 participants