Support Jackson 3 / Spring Boot 4 compatibility path
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 1.5k
- Forks
- 264
- Avg merge
- 9h 46m
- Merged PRs (30d)
- 96
Description
Feature request
The current openai-java SDK depends on Jackson 2.x (com.fasterxml.jackson.*). The README's Jackson section says the SDK is compatible with Jackson 2.13.4 or higher and depends on 2.18.2 by default, and openai-java-core/build.gradle.kts still declares Jackson 2 dependencies.
Spring Boot 4 / Spring Framework 7 applications use Jackson 3 in the HTTP JSON layer (tools.jackson.*). Jackson 3 also changed Maven coordinates and Java packages, so this is not just a dependency-version override.
That creates integration friction when SDK-generated models or Jackson 2 types, especially com.fasterxml.jackson.databind.JsonNode, are returned from controllers or included in application DTOs. In a Spring Boot 4 app, the HTTP layer is using Jackson 3, while the SDK and some SDK-facing code still expose Jackson 2 JSON types. Depending on the shape, Jackson 3 can treat a Jackson 2 JsonNode as a regular Java object instead of a JSON tree unless the application adds bridge serialization code or maps to its own DTOs.
This is not a critical issue when the SDK is used entirely internally, but it becomes more visible for apps that expose REST APIs, compose DTOs around SDK data, or migrate existing Spring Boot services to Boot 4.
Would the project consider one of these paths?
- a Jackson 3-compatible variant/module, for example
openai-java-jackson3 - a Spring Boot 4-friendly starter/module
- a Jackson-neutral public model or raw JSON surface, for example
String,Map, or an SDK-owned lightweight JSON type where appropriate - documentation advising Spring Boot 4 users not to return SDK models or Jackson 2 JSON nodes directly from controllers
- a published migration plan for Jackson 3 compatibility, even if the default SDK remains on Jackson 2 for compatibility
Environment
openai-java: observed locally with4.33.0; current latest release checked:4.36.0- Spring Boot:
4.0.0 - Java:
21 - Application HTTP JSON layer: Jackson 3 (
tools.jackson.*) - SDK JSON dependencies/types: Jackson 2 (
com.fasterxml.jackson.*)
Current workaround
Map SDK objects to application-owned DTOs before returning them from controllers. Where a Jackson 2 JsonNode must cross a Spring Boot 4 HTTP boundary, register a Jackson 3 serializer/module that writes the Jackson 2 tree explicitly.
I understand that moving the whole SDK to Jackson 3 could be a breaking change for Java 8, Android, and existing Spring Boot / Jackson 2 users. This issue is intended as a compatibility-path / documentation request rather than a bug report.
Related references:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the Jackson section in README and the Jackson declarations in openai-java-core/build.gradle.kts, then compare them with the cited Spring Boot 4 and Jackson 3 compatibility constraints. The issue presents several possible paths rather than a selected change, so completion requires agreeing on a compatibility or documentation direction and defining its supported behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, kotlin, spring-boot
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100