Skip to content

Spring Cloud Function managed ObjectMapper serializes instants as timestamps #1171

@0xabadea

Description

@0xabadea

Due to #1148 Spring Cloud Function stopped using the SB-provided ObjectMapper and started using its own instead. This ObjectMapper has the default value of SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, i.e., true, which results in dates being serialized as timestamps such as 1722512479.223919000.

May I use this opportunity and suggest that not using the SB-provided ObjectMapper is not a good idea, as it modifies behavior that SB users have come to rely on. Apart from date serialization, see the complaints about the SCF mapper not supporting Kotlin, as it doesn't register KotlinModule.

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