Skip to content

[FEATURE] Support for Jackson 3.0 (Jakarta EE 11 / Spring Boot 4 compatibility) #300

@efmaster

Description

@efmaster

Describe the problem you'd like to have solved

With the release of Spring Boot 4.0, the Java ecosystem is transitioning to Jackson 3.0 as the primary JSON library. Spring Boot 4 has moved its auto-configuration baseline to the new Jackson 3 packages (tools.jackson.*).

Currently, the OpenFGA Java SDK is strictly tied to Jackson 2.x. When using the SDK in a Spring Boot 4 environment, we encounter significant friction:

  • Dependency Bloat: We are forced to keep both Jackson 2 and Jackson 3 on the classpath.

  • Configuration Conflicts: Spring Boot 4’s auto-configuration defaults to Jackson 3, making it difficult to seamlessly integrate the OpenFGA SDK’s Jackson 2-based models into the global object mapper without complex workarounds.

  • Future-proofing: Official documentation suggests that Jackson 2 support in the Spring ecosystem will be phased out entirely (expected by Spring Boot 4.3).

Describe the ideal solution

The ideal solution would be a version of the OpenFGA Java SDK that natively supports Jackson 3.0 (using the tools.jackson namespace).

Since this involves a change in package names and a move to Jakarta EE 11, this might be released as a new major version of the SDK to avoid breaking changes for users still on Jackson 2/Spring Boot 3. Alternatively, a modular approach or a shaded version could be considered to support both ecosystems during the transition period.

Alternatives and current workarounds

Currently, the only workaround is to run a dual-stack configuration where Jackson 2 and Jackson 3 coexist. This is highly discouraged for production environments as it leads to:

  1. Inconsistent serialization/deserialization behavior.

  2. Manual configuration of the OpenFgaClient to ensure it uses the "old" Jackson 2 mapper while the rest of the application uses Jackson 3.

  3. Increased binary size and potential classpath "jar hell."

Additional context

Spring Boot 4 also introduces a shift toward JSpecify for null-safety. Aligning the SDK with Jackson 3 and modern Jakarta/Spring standards will ensure that OpenFGA remains a first-class citizen in the modern Java cloud-native stack. This request is a prerequisite for updating the openfga-spring-boot-starter to be compatible with Spring Boot 4.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Intake

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions