chore(deps): upgrade to jackson 3

Description

chore(deps): upgrade to jackson 3

Biggest changes are:

1. Exception rework

Jackson 2 exceptions were all based on checked IOException in jackson 3 however, every exception are based on RuntimeException which is ofc unchecked. So this did not only require changes in some method signitures but in the usage of the affected classes too.

How are exceptions mapped in between versions? Based on official jackson info like this:

jackson 2 (checked) jackson 3 (runtime)
JsonProcessingException (root exception) JacksonException
JsonParseException/JsonGenerationException (streaming) StreamReadException/StreamWriteException
JsonMappingException (root for databind exceptions) DatabindException

2. Usage changes(ObjectMapper)

ObjectMapper split into multiple classes based on the data format. In our codebase that's mostly ObjectMapper to JsonMapper.

Disregarding the api/usage changes, most notable is that mappers became immutable while being created via the builder pattern, and that it already includes the JavaTimeModule... I won't list all the changes tho, feel free to ask about anything.

How to test

I just ran the build with tests. Rest needs to be tested at runtime.

Author's checklist

  • I have followed the contribution guidelines
  • This MR has been tested or does not change functionality
  • I have added relevant merge request dependencies (if this MR has any)
  • I have added the correct labels
  • I have assigned reviewers (if any are relevant)
  • I have edited the documentation (if the changes require it) or I have noted the need for the change if I do not have access to the documentation
  • I have marked all introduced BREAKING CHANGES or necessary DEPLOYMENT NOTES in the commit message(s)

Reviewer's checklist

  • This MR has been tested or does not change functionality
  • This MR has correct commit message format

Other information

Main source of info/truth was the official migration guide and also some doc from @ 256627 aka Pavel Z. which I'm not sure I can share.

Closes STR-2067

Edited by Jiří Prokop

Merge request reports

Loading
Loading