Hi, My project is using record as keys for several different maps currently. We are sending these maps over json and in testing we found that we needed a spesific keyDeserializer and I needed to make an ugly keyDeserializer:
module.addKeyDeserializer(FrequencyKey.class, new KeyDeserializer() { @Override public FrequencyKey deserializeKey(String key, DeserializationContext ctxt) throws IOException { return new FrequencyKey( PriceObject.valueOf(key.split(",")[0].split("=")[1]), LocalDate.parse(key.replace("]","").split(",")[1].split("=")[1])); } }); And I would like to not have to make one like this for every Record that we use for keys. It seems like serializing goes just fine and it produce this string for the record: { *"FrequencyKey[priceObject=LED_INTR_ODR, validFrom=2021-11-02]"*: { "id": 12349 } } Anyone that could help me in the correct direction for this? Thanks! -- You received this message because you are subscribed to the Google Groups "jackson-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to jackson-user+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jackson-user/7414ba9a-44b9-485a-9ddc-62a9b4d96a27n%40googlegroups.com.