Skip to content

Migrate Spring AI from Jackson 2 to Jackson 3#5246

Open
sdeleuze wants to merge 1 commit intospring-projects:mainfrom
sdeleuze:jackson3
Open

Migrate Spring AI from Jackson 2 to Jackson 3#5246
sdeleuze wants to merge 1 commit intospring-projects:mainfrom
sdeleuze:jackson3

Conversation

@sdeleuze
Copy link
Contributor

@sdeleuze sdeleuze commented Jan 14, 2026

JsonMapper is used instead of ObjectMapper, following Jackson 3 best practices and the same pattern used by Spring Framework and Spring Boot.

JacksonUtils#instantiateAvailableModules now leverages Jackson service loader based discovery of Jackson modules.

TODO:

  • Upgrade MCP Java SDK to 0.18.0 once released
  • Upgrade MCP annotations to 0.9.0 once released

@sdeleuze sdeleuze requested review from chemicL and tzolov January 14, 2026 15:46
@sdeleuze sdeleuze self-assigned this Jan 14, 2026
@sdeleuze sdeleuze marked this pull request as draft January 14, 2026 15:47
Copy link
Contributor

@filiphr filiphr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pinging me @sdeleuze.

I've left some comments around using JsonMapper.shared() instead of new JsonMapper() in production code. I think it's a better approach to use the shared, since it avoids creating new instances. I tried to comment in all the production code places I saw in case it is easier for you like that.

Additionally, I left some other comments like the fact that we can use Jackson 3 with the ElasticsearchVectorStore and a small note on the hugging face chat model and the schema creation.

JsonMapper is used instead of ObjectMapper, following Jackson 3
best practices and the same pattern used by Spring Framework
and Spring Boot.

JacksonUtils#instantiateAvailableModules now leverages Jackson
service loader based discovery of Jackson modules.

TODO:
 - Upgrade MCP Java SDK to 0.18.0 once released
 - Upgrade MCP annotations to 0.9.0 once released

Signed-off-by: Sébastien Deleuze <sdeleuze@users.noreply.github.com>
@sdeleuze sdeleuze marked this pull request as ready for review February 13, 2026 19:31
@sdeleuze
Copy link
Contributor Author

sdeleuze commented Feb 13, 2026

PR updated (forced pushed given the huge rebase) and ready for a last review before merging it. FYI I will be off for 2 weeks.

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

Successfully merging this pull request may close these issues.

3 participants