Package org.gbif.api.jackson
Class MapEntrySerde
- java.lang.Object
-
- org.gbif.api.jackson.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() { ... };
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MapEntrySerde.MapEntryJsonDeserializer
Deprecated.static class
MapEntrySerde.MapEntryJsonSerializer
Deprecated.
-
Constructor Summary
Constructors Constructor Description MapEntrySerde()
Deprecated.
-
-
-
Constructor Detail
-
MapEntrySerde
public MapEntrySerde()
Deprecated.
-
-