Skip to content

@JsonFormat(shape = Shape.POJO) does not work for java.util.Map serialization via property annotation #5405

@cowtowncoder

Description

@cowtowncoder

(note: split off from #1419 )

So, although Class/default-config to serialize Maps works, doing the same via property annotation doesn't.
Following:

    static class Bean476Container
    {
        @JsonFormat(shape=JsonFormat.Shape.POJO)
        public Map<String, Object> stuff;
    }

will not use "POJO" style serialization.

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.xIssues to be only tackled for Jackson 3.x, not 2.xhas-failing-testIndicates that there exists a test case (under `failing/`) to reproduce the issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions