Jersey 4: Support for Jackson 3 ? #6036
Description
Activity
Hi Jersey maintainers,
There aren't many maintainers left, unfortunately. We're looking for new commiters, so if this is something you can and would like to work on, that would be awesome. Let me know if you're interested.
I'll have some more time available towards the end of the year and next year. I was at Sun Micro (com.sun.hadb) when GlassFish started some 20 years ago - I don't remember if we switched to org.glassfish.hadb back then in 2005.
But first: What's the story with jersey-media-json-jackson and jackson-jaxrs-json-provider ? The code seems a bit "related"
We have been using jersey-media-json-jackson - we should probably try out tools.jackson.jaxrs:jackson-jaxrs-json-provider. Then, there is the question if Jersey should provide a jersey-media-json-jackson3 or delegate to jackson-jaxrs-json-providerI was at Sun Micro (com.sun.hadb) when GlassFish started some 20 years ago - I don't remember if we switched to org.glassfish.hadb back then in 2005.
Oh wow, that was some time ago for sure.
But first: What's the story with jersey-media-json-jackson and jackson-jaxrs-json-provider ?
To be honest, I don't know. I'm a committer on this project, but admittedly not a very active committer. With all the others more or less gone (although they could still contribute in their own time), we'll have to see how we can still move things forward.
Jersey repackages
jackson-jaxrs-json-providerandjackson-jaxrs-baseso that jersey-media-json-jackson uses the version that is tested with Jersey module, and the customer can still be using a different version of Jackson.These two are in the
https://github.com/eclipse-ee4j/jersey/tree/2.x/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs- the prefix from packagecom.fasterxml.jackson.jaxrsis moved toorg.glassfish.jersey.jackson.internal.jackson.jaxrs. The license of Jackson remains.if Jersey should provide a jersey-media-json-jackson3 or delegate to jackson-jaxrs-json-provider
Jackson is not famous for keeping backwards compatibility. I would be worried about whether both the jackson2 and jackson3 modules would be working with the same Jersey configuration code. So I think the new module would be the better choice.
Reacted by Arjan Tijms, Anbu Sampath and Rene LeonhardtHi, I have made an attempt at a new module json-jackson3 based on the pattern from media/json-jackson and tools.jackson - In all 81 files (including example and tests).
This works well with a larger project I am developing/maintaining - just built jersey locally, dropped in json-jackson3, changed the ContextResolver to JsonMapper/Jackson3 and voila.The main changes were due to immutable ObjectMappers and maxStringLength + modules enabled/disabled - so DefaultJacksonJaxbJsonProvider and JacksonMapperConfigurator look a bit different.
But I wonder if MessageProperties.JSON_MAX_STRING_LENGTH is needed - so we could avoid changing StreamReadConstraings.I started off from the 4.0.0-BRANCH. How can we proceed from here? Should I send you a patch for review or create a PR ?
Reacted by Shao-WenWu, Rene Leonhardt, torbica, Kris, Michael Weigmann and Valentin Delaye@jansupol / @arjantijms I have a proposal for json-jackson3 ready locally and can create a PR for further discussion.
Which branch is best suited ? 4.0.0-BRANCH or 4.0 ?Reacted by Rene Leonhardt, Kristoffer Larsen Hopland and Michael WeigmannCurrent flow is 4.0 -> 4.0.JPMS -> release.
Reacted by Jens-Otto LarsenI have created PR 6048. I have tested the basics in the code and with other projects - works OK. Least confident about Filtering
Reacted by Rene Leonhardt, Robert, Stefan Tzeggai, Michael Weigmann and Luis Alberto- linked a pull request that will close this issueIssue 6036: Support for Jackson3 #6048
on Jan 13, 2026
Hi Jersey maintainers,
I am looking into upgrading our projects to use Jackson 3. After doing most of the migration, I am left with our custom ContextResolver: Jersey 4 seems to expect com.fasterxml.jackson and does not pick up a ContextResolver for tools.jackson.databind.ObjectMapper (or tools.jackson.databind.json.JsonMapper - which is our choice for Jackson 3))
What are the plans for supporting Jackson 3?
Our current ContextResolver<Jackson 2.20 ObjectMapper> works well with Jersey 4, so no hurry. But we would eventually want one, global Jackson 3 JsonMapper.
Thanks for all your great work!