How to customly serialize or convert a Map property with custom key type in Jackson JSON (de-)serialization?
问题 I'm serializing instances of @JsonIdentityInfo( generator = ObjectIdGenerators.PropertyGenerator.class, property = "id", scope=Entity1.class) public class Entity1 { private Long id; @JsonSerialize(converter = ValueMapListConverter.class) @JsonDeserialize(converter = ValueMapMapConverter.class) private Map<Entity2, Integer> valueMap = new HashMap<>(); public Entity1() { } public Entity1(Long id) { this.id = id; } [getter and setter] } and @JsonIdentityInfo( generator = ObjectIdGenerators