Skip to content

Support Jackson 3 #78

Description

@lbenedetto

The latest version of Spring is migrating to Jackson 3.
The new Jackson version is aggressively NOT backwards compatible with Jackson 2.

Not migrating will certainly cause problems for anyone trying to use the latest Spring version.

However, I've taken a look through your code and migrating is pretty simple.

The new configuration for a strict mapper in DataHandler would look like this in order to pass the tests

JsonMapper.builder()
        .propertyNamingStrategy(PropertyNamingStrategies.UPPER_CAMEL_CASE)
        .enable(MapperFeature.ACCEPT_CASE_INSENSITIVE_PROPERTIES)
        .changeDefaultPropertyInclusion(incl -> incl.withValueInclusion(JsonInclude.Include.NON_NULL))
        .enable(DeserializationFeature.FAIL_ON_IGNORED_PROPERTIES)
        .enable(DeserializationFeature.FAIL_ON_MISSING_CREATOR_PROPERTIES)
        .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)
        .build();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions