Skip to content

feat(codec): Add Jackson 3 support module (feign-jackson3)#3162

Merged
velo merged 3 commits intoOpenFeign:masterfrom
fbus:master
Feb 6, 2026
Merged

feat(codec): Add Jackson 3 support module (feign-jackson3)#3162
velo merged 3 commits intoOpenFeign:masterfrom
fbus:master

Conversation

@fbus
Copy link
Contributor

@fbus fbus commented Jan 2, 2026

This commit introduces a new module feign-jackson3 that provides support for Jackson 3.x, alongside the existing feign-jackson module which continues to support Jackson 2.x.

Changes

Module Creation

  • Created new jackson3 module based on feign-jackson
  • Added module to parent POM

Jackson 3 Migration

  • Dependency: Upgraded to Jackson 3.0.2 (tools.jackson.core:jackson-databind)
  • Package changes: Migrated from com.fasterxml.jackson.* to tools.jackson.*
    • Exception: com.fasterxml.jackson.annotation remains unchanged (as per Jackson 3 spec)
  • Maven coordinates: Updated groupId from com.fasterxml.jackson.core to tools.jackson.core

API Changes

  • Immutable ObjectMapper: Replaced direct ObjectMapper instantiation with JsonMapper.builder()
    • All configuration now done via builder pattern
  • Exception handling:
    • Jackson 3 uses JacksonException (unchecked) instead of IOException (checked)
    • Updated catch blocks to handle JacksonException and extract IOException from cause when needed
  • Module type: Changed from Module to JacksonModule

Configuration

  • Default settings: Respects Jackson 3 defaults (improved security)
    • FAIL_ON_TRAILING_TOKENS enabled by default (new in Jackson 3)
    • Explicitly disabled for Jackson3IteratorDecoder only (required for streaming array elements)
  • Java version: Minimum Java 17 required (Jackson 3 baseline)

Classes

  • Jackson3Decoder: Standard JSON decoder for Jackson 3
  • Jackson3Encoder: Standard JSON encoder for Jackson 3
  • Jackson3IteratorDecoder: Streaming iterator decoder for large JSON arrays

Tests

  • Migrated all tests from feign-jackson
  • Updated to use Jackson 3 APIs (tools.jackson.* packages)
  • Updated method names for Jackson 3 API changes (e.g., getCurrentName()currentName())
  • All tests passing ✅

Migration Notes

Users can migrate from feign-jackson to feign-jackson3 by:

  1. Updating dependency to feign-jackson3
  2. Changing imports from feign.jackson.* to feign.jackson3.*
  3. Ensuring Java 17+ is available

Both modules can coexist in the same project if needed.

References

This commit introduces a new module `feign-jackson3` that provides support for Jackson 3.x,
alongside the existing `feign-jackson` module which continues to support Jackson 2.x.

## Changes

### Module Creation
- Created new `jackson3` module based on `feign-jackson`
- Added module to parent POM

### Jackson 3 Migration
- **Dependency**: Upgraded to Jackson 3.0.2 (`tools.jackson.core:jackson-databind`)
- **Package changes**: Migrated from `com.fasterxml.jackson.*` to `tools.jackson.*`
  - Exception: `com.fasterxml.jackson.annotation` remains unchanged (as per Jackson 3 spec)
- **Maven coordinates**: Updated groupId from `com.fasterxml.jackson.core` to `tools.jackson.core`

### API Changes
- **Immutable ObjectMapper**: Replaced direct `ObjectMapper` instantiation with `JsonMapper.builder()`
  - All configuration now done via builder pattern
- **Exception handling**:
  - Jackson 3 uses `JacksonException` (unchecked) instead of `IOException` (checked)
  - Updated catch blocks to handle `JacksonException` and extract `IOException` from cause when needed
- **Module type**: Changed from `Module` to `JacksonModule`

### Configuration
- **Default settings**: Respects Jackson 3 defaults (improved security)
  - `FAIL_ON_TRAILING_TOKENS` enabled by default (new in Jackson 3)
  - Explicitly disabled for `Jackson3IteratorDecoder` only (required for streaming array elements)
- **Java version**: Minimum Java 17 required (Jackson 3 baseline)

### Classes
- `Jackson3Decoder`: Standard JSON decoder for Jackson 3
- `Jackson3Encoder`: Standard JSON encoder for Jackson 3
- `Jackson3IteratorDecoder`: Streaming iterator decoder for large JSON arrays

### Tests
- Migrated all tests from `feign-jackson`
- Updated to use Jackson 3 APIs (`tools.jackson.*` packages)
- Updated method names for Jackson 3 API changes (e.g., `getCurrentName()` → `currentName()`)
- All tests passing ✅

## Migration Notes

Users can migrate from `feign-jackson` to `feign-jackson3` by:
1. Updating dependency to `feign-jackson3`
2. Changing imports from `feign.jackson.*` to `feign.jackson3.*`
3. Ensuring Java 17+ is available

Both modules can coexist in the same project if needed.

## References
- [Jackson 3 Migration Guide](https://github.com/FasterXML/jackson/blob/main/jackson3/MIGRATING_TO_JACKSON_3.md)
- [Jackson 3.0 Release Notes](https://github.com/FasterXML/jackson/wiki/Jackson-Release-3.0)
@fbus fbus mentioned this pull request Jan 5, 2026
@vladimirp-ytree
Copy link

Guys when you expect to release it?

@pcsiszar-bw
Copy link

Would very much love to see this released soon

@kistlers
Copy link
Contributor

kistlers commented Feb 5, 2026

Would be nice to have at least a pre-release version of it to start upgrading applications to Spring Boot 4 with Jackson 3.

@velo velo enabled auto-merge (squash) February 6, 2026 12:14
Signed-off-by: Marvin Froeder <velo.br@gmail.com>

# Conflicts:
#	pom.xml
@velo velo disabled auto-merge February 6, 2026 12:20
…dules

Signed-off-by: Marvin Froeder <velo.br@gmail.com>
@velo velo enabled auto-merge (squash) February 6, 2026 12:31
@velo velo merged commit 5e1345e into OpenFeign:master Feb 6, 2026
4 checks passed
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.

7 participants