json-schema-validator icon indicating copy to clipboard operation
json-schema-validator copied to clipboard

Support of Jackson 3

Open ruiarodrigues opened this issue 3 months ago • 5 comments

Hi everyone,

Jackson 3 has been released and one can see in the migration guide a lot has changes: package names, dependency names and much more. I'm currently working on upgrading to Jackson 3 but I can' use it in the module where the schema validation is used. So it means that I have to use jackson 2 and 3 at the same time until json-schema-validator supports Jackson 3.

Is it in the roadmap?

Thanks

ruiarodrigues avatar Oct 28 '25 07:10 ruiarodrigues

Jackson 3 was released early this month, and it has a new package name. That means both versions can co-exist together in the same application. As we have a lot of users depending on Jackson 2, we need to be really careful when migrating to Jackson 3 as our action will force our users to upgrade. I am thinking the best time is when at least half of our users have moved to Jackson 3. At that time, the Jackson 3 should be stable enough for production. I am guessing it would be 1 year from now :) @justin-tay, what do you think? Thanks.

stevehu avatar Oct 28 '25 13:10 stevehu

I already have a branch with Jackson 3, but likely will wait at least half a year for things to stabilise first.

justin-tay avatar Oct 30 '25 13:10 justin-tay

Let's revisit this topic 6 months later. The worst scenario is to support both at the same time. 2.x for Jackson 2 and 3.x for Jackson 3.

stevehu avatar Oct 30 '25 16:10 stevehu

I am thinking the best time is when at least half of our users have moved to Jackson 3.

Isn't that the same as saying the best time is to wait until half your users have been forced to find another solution? Because I know that I'm now forced to find another solution, and am unlikely to bother checking in 6 months to see if I can migrate back, I'll have other problems to deal with.

CliveEvans avatar Dec 10 '25 10:12 CliveEvans

This project is community-driven, and we actively listen to user feedback. If there is no interest expressed, we will revisit this requirement in six months. However, if a significant number of users request an upgraded version, we can maintain two branches and release dual versions. Because this approach requires substantial effort, we prefer not to pursue it without demonstrated demand.

If you would like us to support the Jackson 3 version, please cast your vote here. Thank you.

stevehu avatar Dec 10 '25 23:12 stevehu

My personal microservices project has been upgraded from Jackson 2 to Jackson 3, with the main modifications involving the following aspects

  1. Change com.fasterxml.jackson to tools.jackson, including the import package and groupId in the dependencies
  2. All exceptions thrown by Jackson3 should be uniformly changed to JacksonException
  3. The creation and configuration of ObjectMapper is no longer recommended to use new ObjectMapper, but instead should be replaced with JsonMapper.builder().build(), including Jackson Yaml
  4. Some ObjectMapper configurations have modified the default state in Jackson3

After a quick review of the Jackson-related sections in the json-schema-validator source code, the preliminary assessment indicates that the primary workload involves:

  1. Change com.fasterxml.jackson to tools.jackson
  2. Modify the code that throws IOException to throw JacksonException instead.
  3. Since json-schema-validator has already built an ObjectMapper using JsonMapper, no modifications are needed.
  4. Since no configuration settings for ObjectMapper were found in json-schema-validator, I personally feel there is no need to modify it.

Of course, there are revised tests and verifications. However, based on my personal project experience, no major issues have arisen. Therefore, please evaluate whether the project team needs to proceed with the development of Jackson3 version.

herodotus-ecosystem avatar Dec 13 '25 10:12 herodotus-ecosystem

I have released version 3.0.0 from the master branch and created 2.x branch. Please test it and let us know if you encounter any issues. Thanks.

stevehu avatar Dec 14 '25 03:12 stevehu

Once I got over the surprise breaking changes, everything works fine for me here. Thanks for listening and updating.

CliveEvans avatar Dec 17 '25 10:12 CliveEvans