Class MapEntrySerde


  • @Deprecated
    public class MapEntrySerde
    extends Object
    Deprecated.

    Jackson Serializer and Deserializer for Map.Entry.

    This is mostly for pre 2.7 version of Jackson, see Jackson Databind issue 565.

    The goal is to omit the key/value field name since they are implicit for a Map.Entry. {"key":"mykey","value":18} becomes {"mykey":18}

    The key will use toString() and the value can only be a String or a Number (int or float) for now.

     // Usage for lists:
     @JsonSerialize(contentUsing = MapEntrySerde.MapEntryJsonSerializer.class)
     public List> getKeyValueList() { ... };