Skip to content

(guava) Better multiset serialization / deserialization #2

@cowtowncoder

Description

@cowtowncoder

(moved from FasterXML/jackson-datatype-guava#51 by @devinrsmith)

Currently, multisets' serialization size is proportional to Multiset.size() as opposed to Multiset.entrySet().size().

For example, if I have do Multiset.setCount("my_key", 1000), "my_key" is repeated 1000 times in the output. It would be much more appropriate if it behaved liked Map<String, Integer>.


I'm not familiar w/ the intricacies of jackson serialization / deserialization. I'd be pretty surprised if there is widespread use of serializing Multisets (using the existing jackson library)... I would have guessed a lot of other people would be bringing up this exact issue if they were using it. Does jackson ever create hard-breaks in backwards compatibility?

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueIssue that seems easy to resolve and is likely a good candidate for contributors new to projectguava

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions