Skip to content

MonthDaySerializer does not serialize objects into array #107

@XhstormR

Description

@XhstormR

Unlike YearMonthSerializer serialize objects as array " [2018, 5]", MonthDaySerializer serialize to "--03-02"

I notice document say, what should i do :

NOTE: unlike many other date/time type serializers, this serializer will only use Array notation if explicitly instructed to do so with JsonFormat (either directly or through per-type defaults) and NOT with global defaults.

I use org.springframework.boot:spring-boot-starter-web:2.1.3.RELEASE,
com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.8,
com.fasterxml.jackson.module:jackson-module-kotlin:2.9.8

application.yml

  jackson:
    serialization:
      INDENT_OUTPUT: false
      WRITE_DATES_AS_TIMESTAMPS: true

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