Skip to content
This repository has been archived by the owner on Jan 22, 2019. It is now read-only.

Multimap Serializer doesn't honor @JsonInclude(JsonInclude.Include.NON_EMPTY) #41

Closed
olvesh opened this issue Mar 21, 2014 · 2 comments
Closed
Milestone

Comments

@olvesh
Copy link

olvesh commented Mar 21, 2014

The code below will give the following json object:

{"someMap" : { }}

and I would expect

{ }

This happens also when I confiugre the mapper to:

mapper.setSerializationInclusion(JsonInclude.Include.NON_EMPTY);
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    class MainClass {
        @JsonProperty
        Multimap<String, String> someMap = ArrayListMultimap.create();
    }
@cowtowncoder
Copy link
Member

Thanks! Deserializer is probably missing definition of what "empty" means here, or check. Will see.

@cowtowncoder cowtowncoder added this to the 2.3.3 milestone Mar 21, 2014
@cowtowncoder
Copy link
Member

Changed MultimapSerializer to extend ContainerSerializer, implement necessary support methods: this resolves specific issue reported, as well as other potentially missing hooks for container types.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants