Skip to content

Looking for alternatives to Jackson > 2.x serialization #1647

@atrauzzi

Description

@atrauzzi

Encountered a scenario where a dev is customizing Dapr's ObjectMapper by extending DefaultObjectSerializer and modifying the static OBJECT_MAPPER:

static {
  OBJECT_MAPPER.findAndRegisterModules();
  OBJECT_MAPPER.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
  OBJECT_MAPPER.enable(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS);
}

This will break with Jackson 3.x because ObjectMapper/JsonMapper is now fully immutable - configuration must happen at construction time via builder pattern. Methods like disable(), enable(), configure() no longer exist on the mapper instance.


Is there an alternative available for people who have made this kind of customization?

cc. @salaboy

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