How to ser/deser ListMultimap via protostuff

78 views
Skip to first unread message

squallud

unread,
Jul 3, 2020, 12:11:03 AM7/3/20
to protostuff
The object struct is like this:

public class ListMultiMapWrapper
{
    ListMultimap data;

    public ListMultiMapWrapper(final ListMultimap data)
    {
        this.data = data;
    }

    public ListMultimap getData()
    {
        return data;
    }
}

public void testLinkedListMultimapSerde()
{
    ListMultimap<String, String> listMultimap = LinkedListMultimap.create();

    listMultimap.put("xy", "xy1");
    listMultimap.put("xy", "xy2");

    ListMultiMapWrapper commonDataWrapper = new ListMultiMapWrapper(listMultimap);

    //do ser and deser
    ....
}

After deserialize, the deserialized ListMultimap is empty. How to ser/deser ListMultimap via protostuff?
Reply all
Reply to author
Forward
0 new messages