Migrate to Jackson 3.1.5 - #3872
Open
staktrace wants to merge 1 commit into
Open
Conversation
Bumps the Jackson BOM from 2.21.2 to 3.1.5 and moves the five Jackson-using source files onto the `tools.jackson` packages. `jackson-annotations` is deliberately left on `com.fasterxml` — it is not renamed in 3.x and the 3.1.5 BOM pins it to 2.21, which is what lets Jackson 2 and 3 coexist on a classpath. `jackson-datatype-jsr310` is dropped; java.time support is folded into databind in 3.x. Three changes are behavioural rather than mechanical: - Mappers are immutable in 3.x, but `SecretDeserializer` and `ResourceAwareDeserializer` parse nested documents with the very mapper they are registered on. They now take a `() -> ObjectMapper` supplier that resolves once `builder.build()` returns. `SecretJacksonModule` keeps its `ObjectMapper` constructor and exposes `mapper` as a computed property, so its source shape is unchanged. - `FAIL_ON_UNKNOWN_PROPERTIES` defaults to false in 3.x. Left alone, MiskConfig's "'x' not found in Config, did you mean...?" warning would silently never fire again and config typos would be ignored. It is now explicitly enabled for the first parse attempt; the retry path used to relax the mapper in place and instead rebuilds one. - `SORT_PROPERTIES_ALPHABETICALLY` and `EnumFeature.READ/WRITE_ENUMS_USING_TO_STRING` default on in 3.x and are pinned off. Sorting would reshuffle every service's redacted config dashboard, and config enums are matched by name while `toString()` is frequently overridden for display. This is a breaking change for consumers. The affected ABI, confirmed by the regenerated api dumps, is limited to: the `MiskConfig.load` overloads taking `JsonNode`/`ValueDeserializerModifier`, the three `SimpleModule` subclasses in misk-config, and `BackwardsCompatibleClientsConfigConverter`. Both misk-config and misk expose Jackson via `api(...)`, so consumers relying on the transitive dependency inherit Jackson 3.
staktrace
force-pushed
the
kartikaya.jackson3
branch
from
August 4, 2026 23:41
90e36ba to
7002dd6
Compare
staktrace
marked this pull request as ready for review
August 4, 2026 23:42
Collaborator
Author
|
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.
Bumps the Jackson BOM from 2.21.2 to 3.1.5 and moves the five Jackson-using source files onto the
tools.jacksonpackages.jackson-annotationsis deliberately left oncom.fasterxml— it is not renamed in 3.x and the 3.1.5 BOM pins it to 2.21, which is what lets Jackson 2 and 3 coexist on a classpath.jackson-datatype-jsr310is dropped; java.time support is folded into databind in 3.x.Three changes are behavioural rather than mechanical:
Mappers are immutable in 3.x, but
SecretDeserializerandResourceAwareDeserializerparse nested documents with the very mapper they are registered on. They now take a() -> ObjectMappersupplier that resolves oncebuilder.build()returns.SecretJacksonModulekeeps itsObjectMapperconstructor and exposesmapperas a computed property, so its source shape is unchanged.FAIL_ON_UNKNOWN_PROPERTIESdefaults to false in 3.x. Left alone, MiskConfig's "'x' not found in Config, did you mean...?" warning would silently never fire again and config typos would be ignored. It is now explicitly enabled for the first parse attempt; the retry path used to relax the mapper in place and instead rebuilds one.SORT_PROPERTIES_ALPHABETICALLYandEnumFeature.READ/WRITE_ENUMS_USING_TO_STRINGdefault on in 3.x and are pinned off. Sorting would reshuffle every service's redacted config dashboard, and config enums are matched by name whiletoString()is frequently overridden for display.This is a breaking change for consumers. The affected ABI, confirmed by the regenerated api dumps, is limited to: the
MiskConfig.loadoverloads takingJsonNode/ValueDeserializerModifier, the threeSimpleModulesubclasses in misk-config, andBackwardsCompatibleClientsConfigConverter. Both misk-config and misk expose Jackson viaapi(...), so consumers relying on the transitive dependency inherit Jackson 3.