Skip to content

SPRNGCORE-18: Properly switch to Jackson 3.#115

Merged
kaladay merged 2 commits into
mainfrom
SPRNGCORE-18-object_mapper
May 28, 2026
Merged

SPRNGCORE-18: Properly switch to Jackson 3.#115
kaladay merged 2 commits into
mainfrom
SPRNGCORE-18-object_mapper

Conversation

@kaladay
Copy link
Copy Markdown
Contributor

@kaladay kaladay commented May 27, 2026

Further resolves SPRNGCORE-18 .

Use JsonMapper directly instead of ObjectMapper.

  • Use Jackson 2 as the default behavior.
  • Apply common default properties.
  • Ensure modules are auto-found just like with Jackson 2.

Address some of the problems reported by SonarQube.

Provide a MapperHelper in the unit tests in order to have a consistent way of instantiating JsonMapper.

  • This avoids having to add the excessive and complicated settings that are now needed due to the Jackson 3 design.

Use `JsonMapper` directly instead of `ObjectMapper`.
  - Use **Jackson 2** as the default behavior.
  - Apply common default properties.
  - Ensure modules are auto-found just like with **Jackson 2**.

Address some of the problems reported by **SonarQube**.

Provide a `MapperHelper` in the unit tests in order to have a consistent way of instantiating `JsonMapper`.
  - This avoids having to add the excessive and complicated settings that are now needed due to the **Jackson 3** design.
@kaladay kaladay requested a review from a team May 27, 2026 21:25
Add the most basic of unit tests for `MapperHelper`.
There really isn't much to test here and this class is only for use by unit testing.

Break apart the `MapperHelper.build()` into two functions such that there is not a `construct()` method.
This new function should allow for more customizations before building while still using the defaults provided by this class.
@sonarqubecloud
Copy link
Copy Markdown

@kaladay kaladay merged commit 0b6af90 into main May 28, 2026
16 checks passed
@kaladay kaladay deleted the SPRNGCORE-18-object_mapper branch May 28, 2026 14:21
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.

2 participants