Migrate Spring AI from Jackson 2 to Jackson 3#5246
Open
sdeleuze wants to merge 1 commit intospring-projects:mainfrom
Open
Migrate Spring AI from Jackson 2 to Jackson 3#5246sdeleuze wants to merge 1 commit intospring-projects:mainfrom
sdeleuze wants to merge 1 commit intospring-projects:mainfrom
Conversation
filiphr
reviewed
Jan 14, 2026
Contributor
There was a problem hiding this comment.
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.
.../springframework/ai/mcp/client/common/autoconfigure/properties/McpStdioClientProperties.java
Outdated
Show resolved
Hide resolved
.../mcp/client/httpclient/autoconfigure/StreamableHttpHttpClientTransportAutoConfiguration.java
Outdated
Show resolved
Hide resolved
...ramework/ai/mcp/client/httpclient/autoconfigure/SseHttpClientTransportAutoConfiguration.java
Show resolved
Hide resolved
...pringframework/ai/mcp/client/webflux/autoconfigure/SseWebFluxTransportAutoConfiguration.java
Outdated
Show resolved
Hide resolved
...ork/ai/mcp/client/webflux/autoconfigure/StreamableHttpWebFluxTransportAutoConfiguration.java
Show resolved
Hide resolved
...pring-ai-chroma-store/src/main/java/org/springframework/ai/chroma/vectorstore/ChromaApi.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/springframework/ai/vectorstore/elasticsearch/ElasticsearchVectorStore.java
Outdated
Show resolved
Hide resolved
...one-store/src/main/java/org/springframework/ai/vectorstore/pinecone/PineconeVectorStore.java
Outdated
Show resolved
Hide resolved
...ate-store/src/main/java/org/springframework/ai/vectorstore/weaviate/WeaviateVectorStore.java
Outdated
Show resolved
Hide resolved
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>
Contributor
Author
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JsonMapperis used instead ofObjectMapper, following Jackson 3 best practices and the same pattern used by Spring Framework and Spring Boot.JacksonUtils#instantiateAvailableModulesnow leverages Jackson service loader based discovery of Jackson modules.TODO: