Skip to content

Upgrade to Jackson3 #1222

Merged
ynojima merged 11 commits intomasterfrom
jackson3
Jan 21, 2026
Merged

Upgrade to Jackson3 #1222
ynojima merged 11 commits intomasterfrom
jackson3

Conversation

@ynojima
Copy link
Copy Markdown
Member

@ynojima ynojima commented Dec 31, 2025

  • Upgraded from Jackson 2 to Jackson 3
  • The ObjectConverter constructor now takes JsonMapper and CBORMapper (introduced in Jackson 3) instead of ObjectMapper for JSON and ObjectMapper for CBOR
  • The JsonConverter and CborConverter returned by ObjectConverter#getJsonConverter() and ObjectConverter#getCborConverter() have been deprecated and will be removed in the future
    • These were thin wrappers created to distinguish between the JSON and CBOR mappers in a type-safe manner and to wrap checked exceptions thrown by Jackson 2
    • However, as JsonMapper and CBORMapper in Jackson 3 no longer throw checked exceptions, these wrappers are now obsolete
    • Please use the JsonMapper and CBORMapper instances returned by ObjectConverter#getJsonMapper() and ObjectConverter#getCborMapper(), which are configured for WebAuthn data structure serialization/deserialization
    • Note: unlike JsonConverter and CborConverter, exceptions will no longer be wrapped in DataConversionException when using JsonMapper or CBORMapper directly
  • The Jackson DeserializationFeature.FAIL_ON_TRAILING_TOKENS option has been enabled
    • This aligns with the default behavior in Jackson 3 and causes deserialization to fail if invalid trailing data is found at the end of the input
  • The Jackson SerializationFeature.FAIL_ON_EMPTY_BEANS option has been enabled
    • This aligns with the default behavior in Jackson 3
  • The Jackson DeserializationFeature.WRAP_EXCEPTIONS option has been enabled
    • This aligns with the default behavior in Jackson 3
  • The JacksonUtil no longer wraps IOException with UncheckedIOException as Jackson no longer throws IOException

@ynojima ynojima force-pushed the jackson3 branch 6 times, most recently from b16e802 to 4660f44 Compare December 31, 2025 14:07
- Upgrade to Jackson3
- Now ObjectConverter constructor takes JsonMapper and CBORMapper as
  parameters instead of ObjectMapper
- JacksonUtil no longer wraps IOException with UncheckedIOException as
  Jackson no longer returns IOException
- JsonConverter and CborConverter no longer wraps IOException with
  UncheckedIOEception as jackson no longer returns IOException
@ynojima ynojima force-pushed the jackson3 branch 7 times, most recently from 924183c to 9f940b0 Compare January 1, 2026 14:12
The JsonConverter and CborConverter were thin wrappers around ObjectMapper and wrapped checked exceptions into unchecked ones.
They also specified at the type level whether it was a JSON or CBOR converter.
However, since Jackson 3 introduced JsonMapper and CborMapper and they no longer throw checked exceptions, JsonConverter and CborConverter have been deprecated.

Please note that when switching from JsonConverter to JsonMapper or from CborConverter to CborMapper, exceptions will no longer be wrapped in a DataConversionException.
to align with Jackson3 default
and removed failing test cases.
These test cases were originally added to verify that IOExceptions would be wrapped when they occurred, but since IOExceptions no longer occur, they have become unnecessary.
@ynojima ynojima changed the title WIP: Upgrade to Jackson3 Upgrade to Jackson3 Jan 2, 2026
@ynojima ynojima added the breaking change Breaks existing interface label Jan 2, 2026
@sonarqubecloud
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown

📦 JitPack Build

The build and tests passed! You can test this Pull Request using JitPack.

Maven

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>

<dependency>
    <groupId>com.github.webauthn4j.webauthn4j</groupId>
    <artifactId>webauthn4j-core</artifactId>
    <version>jackson3-SNAPSHOT</version>
</dependency>

Gradle

repositories {
    maven { url 'https://jitpack.io' }
}

dependencies {
    implementation 'com.github.webauthn4j.webauthn4j:webauthn4j-core:jackson3-SNAPSHOT'
}

You can verify the build status on JitPack.

@ynojima ynojima marked this pull request as ready for review January 21, 2026 07:16
@ynojima ynojima merged commit 3af22b0 into master Jan 21, 2026
20 checks passed
@ynojima ynojima deleted the jackson3 branch January 21, 2026 07:17
@ynojima ynojima added this to the 0.31.0.RELEASE milestone Feb 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change Breaks existing interface

Development

Successfully merging this pull request may close these issues.

Should validate that attestation object does not contain extra bogus data at end Support Jackson3

1 participant